ngx-t-forms 2.0.30 → 2.0.32

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 (161) hide show
  1. package/fesm2022/ngx-t-forms-auto-complete-input-element.component-CaXs4561.mjs +104 -0
  2. package/fesm2022/ngx-t-forms-auto-complete-input-element.component-CaXs4561.mjs.map +1 -0
  3. package/fesm2022/ngx-t-forms-basic-input-input-element.component-Dotyd-Qs.mjs +85 -0
  4. package/fesm2022/ngx-t-forms-basic-input-input-element.component-Dotyd-Qs.mjs.map +1 -0
  5. package/fesm2022/ngx-t-forms-calculated-field-rules.component-BhxT6tRq.mjs +643 -0
  6. package/fesm2022/ngx-t-forms-calculated-field-rules.component-BhxT6tRq.mjs.map +1 -0
  7. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-d4QeVhsp.mjs +97 -0
  8. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-d4QeVhsp.mjs.map +1 -0
  9. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Gn8exJ9a.mjs +195 -0
  10. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Gn8exJ9a.mjs.map +1 -0
  11. package/fesm2022/ngx-t-forms-data-source-picker.component-Ebf_if9j.mjs +261 -0
  12. package/fesm2022/ngx-t-forms-data-source-picker.component-Ebf_if9j.mjs.map +1 -0
  13. package/fesm2022/ngx-t-forms-date-picker-input-element.component-kdinBGRA.mjs +85 -0
  14. package/fesm2022/ngx-t-forms-date-picker-input-element.component-kdinBGRA.mjs.map +1 -0
  15. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-4W6uvrDU.mjs +156 -0
  16. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-4W6uvrDU.mjs.map +1 -0
  17. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-CR6EvgJO.mjs +368 -0
  18. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-CR6EvgJO.mjs.map +1 -0
  19. package/fesm2022/ngx-t-forms-document-picker.component-BThdRFec.mjs +704 -0
  20. package/fesm2022/ngx-t-forms-document-picker.component-BThdRFec.mjs.map +1 -0
  21. package/fesm2022/ngx-t-forms-editor-input-element.component-1X6uAPeZ.mjs +294 -0
  22. package/fesm2022/ngx-t-forms-editor-input-element.component-1X6uAPeZ.mjs.map +1 -0
  23. package/fesm2022/ngx-t-forms-editor-js-input.component-5MD8wRj0.mjs +240 -0
  24. package/fesm2022/ngx-t-forms-editor-js-input.component-5MD8wRj0.mjs.map +1 -0
  25. package/fesm2022/ngx-t-forms-file-upload-input-element.component-BAtuymMY.mjs +205 -0
  26. package/fesm2022/ngx-t-forms-file-upload-input-element.component-BAtuymMY.mjs.map +1 -0
  27. package/fesm2022/ngx-t-forms-form-input-selector.component-B42xP3jh.mjs +86 -0
  28. package/fesm2022/ngx-t-forms-form-input-selector.component-B42xP3jh.mjs.map +1 -0
  29. package/fesm2022/ngx-t-forms-form-json-view.component-DnnLXqR0.mjs +22 -0
  30. package/fesm2022/ngx-t-forms-form-json-view.component-DnnLXqR0.mjs.map +1 -0
  31. package/fesm2022/ngx-t-forms-form-payload-projection.component-Ip9ewB18.mjs +179 -0
  32. package/fesm2022/ngx-t-forms-form-payload-projection.component-Ip9ewB18.mjs.map +1 -0
  33. package/fesm2022/ngx-t-forms-form-section-stepper.component-BPgPfZSy.mjs +319 -0
  34. package/fesm2022/ngx-t-forms-form-section-stepper.component-BPgPfZSy.mjs.map +1 -0
  35. package/fesm2022/ngx-t-forms-forms-builder-menu.component-Dv0Dfw79.mjs +379 -0
  36. package/fesm2022/ngx-t-forms-forms-builder-menu.component-Dv0Dfw79.mjs.map +1 -0
  37. package/fesm2022/ngx-t-forms-geo-location.component-Bmd84Gcb.mjs +124 -0
  38. package/fesm2022/ngx-t-forms-geo-location.component-Bmd84Gcb.mjs.map +1 -0
  39. package/fesm2022/ngx-t-forms-getInputIcon-B4ADgevZ.mjs +31 -0
  40. package/fesm2022/ngx-t-forms-getInputIcon-B4ADgevZ.mjs.map +1 -0
  41. package/fesm2022/ngx-t-forms-image-capture-input-element.component-CUd04Ghl.mjs +180 -0
  42. package/fesm2022/ngx-t-forms-image-capture-input-element.component-CUd04Ghl.mjs.map +1 -0
  43. package/fesm2022/ngx-t-forms-index-BcrQ01DQ.mjs +2 -0
  44. package/fesm2022/ngx-t-forms-index-BcrQ01DQ.mjs.map +1 -0
  45. package/fesm2022/ngx-t-forms-input-custom.component-Cn-KH0Lb.mjs +105 -0
  46. package/fesm2022/ngx-t-forms-input-custom.component-Cn-KH0Lb.mjs.map +1 -0
  47. package/fesm2022/ngx-t-forms-input-editor.component-DLru1Ezu.mjs +193 -0
  48. package/fesm2022/ngx-t-forms-input-editor.component-DLru1Ezu.mjs.map +1 -0
  49. package/fesm2022/{ngx-t-forms-map-mat-options-keys-SM5XM9uy.mjs → ngx-t-forms-map-mat-options-keys-CVlPdrCO.mjs} +12 -14
  50. package/fesm2022/ngx-t-forms-map-mat-options-keys-CVlPdrCO.mjs.map +1 -0
  51. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-BWisS3Em.mjs +66 -0
  52. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-BWisS3Em.mjs.map +1 -0
  53. package/fesm2022/ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs +211 -0
  54. package/fesm2022/ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs.map +1 -0
  55. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs +165 -0
  56. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs.map +1 -0
  57. package/fesm2022/ngx-t-forms-missing-form-configs.component-DxdynZY6.mjs +38 -0
  58. package/fesm2022/ngx-t-forms-missing-form-configs.component-DxdynZY6.mjs.map +1 -0
  59. package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D4Xa_Yi0.mjs +38 -0
  60. package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D4Xa_Yi0.mjs.map +1 -0
  61. package/fesm2022/ngx-t-forms-mscoa-error-display.component-99DpVSy7.mjs +126 -0
  62. package/fesm2022/ngx-t-forms-mscoa-error-display.component-99DpVSy7.mjs.map +1 -0
  63. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-Bo0aDEMy.mjs +447 -0
  64. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-Bo0aDEMy.mjs.map +1 -0
  65. package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs +74 -0
  66. package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs.map +1 -0
  67. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-C8JP3D6r.mjs +905 -0
  68. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-C8JP3D6r.mjs.map +1 -0
  69. package/fesm2022/ngx-t-forms-ngx-t-forms-C2G8_WQk.mjs +20310 -0
  70. package/fesm2022/ngx-t-forms-ngx-t-forms-C2G8_WQk.mjs.map +1 -0
  71. package/fesm2022/ngx-t-forms-paginated-selection-table-0OI1ikWW.mjs +555 -0
  72. package/fesm2022/ngx-t-forms-paginated-selection-table-0OI1ikWW.mjs.map +1 -0
  73. package/fesm2022/ngx-t-forms-pipeline-generator.component-CZ21sd77.mjs +748 -0
  74. package/fesm2022/ngx-t-forms-pipeline-generator.component-CZ21sd77.mjs.map +1 -0
  75. package/fesm2022/ngx-t-forms-record-list-manager.component-CykBq_nW.mjs +358 -0
  76. package/fesm2022/ngx-t-forms-record-list-manager.component-CykBq_nW.mjs.map +1 -0
  77. package/fesm2022/ngx-t-forms-required-inputs.component-ONbhxVSH.mjs +272 -0
  78. package/fesm2022/ngx-t-forms-required-inputs.component-ONbhxVSH.mjs.map +1 -0
  79. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-WPUxtY7Q.mjs +398 -0
  80. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-WPUxtY7Q.mjs.map +1 -0
  81. package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs +38 -0
  82. package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs.map +1 -0
  83. package/fesm2022/ngx-t-forms-section-report.component-C1w16LYm.mjs +98 -0
  84. package/fesm2022/ngx-t-forms-section-report.component-C1w16LYm.mjs.map +1 -0
  85. package/fesm2022/ngx-t-forms-select-input-element.component-CWcywuS6.mjs +150 -0
  86. package/fesm2022/ngx-t-forms-select-input-element.component-CWcywuS6.mjs.map +1 -0
  87. package/fesm2022/ngx-t-forms-selection-options-editor.component-KjbZhc2u.mjs +169 -0
  88. package/fesm2022/ngx-t-forms-selection-options-editor.component-KjbZhc2u.mjs.map +1 -0
  89. package/fesm2022/ngx-t-forms-t-workflow-picker.component-CtavFAUq.mjs +204 -0
  90. package/fesm2022/ngx-t-forms-t-workflow-picker.component-CtavFAUq.mjs.map +1 -0
  91. package/fesm2022/ngx-t-forms-textarea-input-element.component-DkJkBQif.mjs +95 -0
  92. package/fesm2022/ngx-t-forms-textarea-input-element.component-DkJkBQif.mjs.map +1 -0
  93. package/fesm2022/ngx-t-forms-toggle-input-element.component-Dr7MNli8.mjs +82 -0
  94. package/fesm2022/ngx-t-forms-toggle-input-element.component-Dr7MNli8.mjs.map +1 -0
  95. package/fesm2022/ngx-t-forms-validators-config.component-BknyAmV_.mjs +574 -0
  96. package/fesm2022/ngx-t-forms-validators-config.component-BknyAmV_.mjs.map +1 -0
  97. package/fesm2022/ngx-t-forms-workflow-adjudication.component-CPvwm7f4.mjs +1303 -0
  98. package/fesm2022/ngx-t-forms-workflow-adjudication.component-CPvwm7f4.mjs.map +1 -0
  99. package/fesm2022/ngx-t-forms.mjs +2 -1
  100. package/fesm2022/ngx-t-forms.mjs.map +1 -1
  101. package/package.json +20 -18
  102. package/styles/_editor-mixins.scss +62 -0
  103. package/styles/_json-editor-syntax.scss +26 -0
  104. package/styles/_signature-pad.scss +26 -0
  105. package/styles/_tokens.scss +148 -0
  106. package/types/ngx-t-forms.d.ts +1921 -733
  107. package/fesm2022/ngx-t-forms-calculated-field-rules.component-Ct6_c_Lj.mjs +0 -313
  108. package/fesm2022/ngx-t-forms-calculated-field-rules.component-Ct6_c_Lj.mjs.map +0 -1
  109. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-yuM1KHho.mjs +0 -191
  110. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-yuM1KHho.mjs.map +0 -1
  111. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-BptpYSe-.mjs +0 -207
  112. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-BptpYSe-.mjs.map +0 -1
  113. package/fesm2022/ngx-t-forms-data-source-picker.component-Badna1Rl.mjs +0 -204
  114. package/fesm2022/ngx-t-forms-data-source-picker.component-Badna1Rl.mjs.map +0 -1
  115. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-2_8XzUgD.mjs +0 -289
  116. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-2_8XzUgD.mjs.map +0 -1
  117. package/fesm2022/ngx-t-forms-form-input-selector.component-DV4Sts9F.mjs +0 -134
  118. package/fesm2022/ngx-t-forms-form-input-selector.component-DV4Sts9F.mjs.map +0 -1
  119. package/fesm2022/ngx-t-forms-form-json-view.component-B8seYzMQ.mjs +0 -22
  120. package/fesm2022/ngx-t-forms-form-json-view.component-B8seYzMQ.mjs.map +0 -1
  121. package/fesm2022/ngx-t-forms-form-section-stepper.component-x_83iAWA.mjs +0 -281
  122. package/fesm2022/ngx-t-forms-form-section-stepper.component-x_83iAWA.mjs.map +0 -1
  123. package/fesm2022/ngx-t-forms-forms-builder-menu.component-UWo_dyVt.mjs +0 -345
  124. package/fesm2022/ngx-t-forms-forms-builder-menu.component-UWo_dyVt.mjs.map +0 -1
  125. package/fesm2022/ngx-t-forms-input-editor.component-B_kkOoEO.mjs +0 -147
  126. package/fesm2022/ngx-t-forms-input-editor.component-B_kkOoEO.mjs.map +0 -1
  127. package/fesm2022/ngx-t-forms-map-mat-options-keys-SM5XM9uy.mjs.map +0 -1
  128. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-C41AL9Et.mjs +0 -105
  129. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-C41AL9Et.mjs.map +0 -1
  130. package/fesm2022/ngx-t-forms-mat-slider-editor.component-BWe8U-sI.mjs +0 -109
  131. package/fesm2022/ngx-t-forms-mat-slider-editor.component-BWe8U-sI.mjs.map +0 -1
  132. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-B_XlkHuK.mjs +0 -155
  133. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-B_XlkHuK.mjs.map +0 -1
  134. package/fesm2022/ngx-t-forms-missing-form-configs.component-DPNNyKkt.mjs +0 -28
  135. package/fesm2022/ngx-t-forms-missing-form-configs.component-DPNNyKkt.mjs.map +0 -1
  136. package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-DY1QnG08.mjs +0 -43
  137. package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-DY1QnG08.mjs.map +0 -1
  138. package/fesm2022/ngx-t-forms-mscoa-error-display.component-CRc_4l3l.mjs +0 -116
  139. package/fesm2022/ngx-t-forms-mscoa-error-display.component-CRc_4l3l.mjs.map +0 -1
  140. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-Ckr_nuZF.mjs +0 -296
  141. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-Ckr_nuZF.mjs.map +0 -1
  142. package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-GYxT-56Y.mjs +0 -83
  143. package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-GYxT-56Y.mjs.map +0 -1
  144. package/fesm2022/ngx-t-forms-ngx-t-forms-DP2koSL5.mjs +0 -17401
  145. package/fesm2022/ngx-t-forms-ngx-t-forms-DP2koSL5.mjs.map +0 -1
  146. package/fesm2022/ngx-t-forms-pipeline-generator.component-BxHetD_Q.mjs +0 -613
  147. package/fesm2022/ngx-t-forms-pipeline-generator.component-BxHetD_Q.mjs.map +0 -1
  148. package/fesm2022/ngx-t-forms-record-list-manager.component-BQuMkoXo.mjs +0 -269
  149. package/fesm2022/ngx-t-forms-record-list-manager.component-BQuMkoXo.mjs.map +0 -1
  150. package/fesm2022/ngx-t-forms-required-inputs.component-CLyq9dIR.mjs +0 -190
  151. package/fesm2022/ngx-t-forms-required-inputs.component-CLyq9dIR.mjs.map +0 -1
  152. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-CWeIUKLz.mjs +0 -291
  153. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-CWeIUKLz.mjs.map +0 -1
  154. package/fesm2022/ngx-t-forms-section-report.component-BtaF39WD.mjs +0 -156
  155. package/fesm2022/ngx-t-forms-section-report.component-BtaF39WD.mjs.map +0 -1
  156. package/fesm2022/ngx-t-forms-selection-options-editor.component-B4cEGWrK.mjs +0 -186
  157. package/fesm2022/ngx-t-forms-selection-options-editor.component-B4cEGWrK.mjs.map +0 -1
  158. package/fesm2022/ngx-t-forms-t-workflow-picker.component-BkVN4Wdk.mjs +0 -187
  159. package/fesm2022/ngx-t-forms-t-workflow-picker.component-BkVN4Wdk.mjs.map +0 -1
  160. package/fesm2022/ngx-t-forms-validators-config.component-Cq07Er-G.mjs +0 -215
  161. package/fesm2022/ngx-t-forms-validators-config.component-Cq07Er-G.mjs.map +0 -1
@@ -1,65 +1,420 @@
1
- import * as i0 from '@angular/core';
2
- import { EnvironmentProviders, OnDestroy, InjectionToken, OnInit, EventEmitter, ElementRef, NgZone, SimpleChanges, PipeTransform } from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
2
+ import { Provider, EnvironmentProviders, InjectionToken, OnInit, OnDestroy, Signal, PipeTransform, Type, ElementRef } from '@angular/core';
3
3
  import * as ngx_t_forms_types from 'ngx-t-forms-types';
4
- import { OLD_FormInterface, FormInterface, NgxTFormsConfig, FormColumnInputs, IFormChangeHistory, FormSubmissionStatus, ElementEditorInnerSectionElementInterface, InClassFormUtilsInterface, ValidationError, FormInputKeys, SpecialElementKeys, AllFormInputPrimaryKeys, ElementEditorTypes, FormInputBasicOptionInterface, TreeNode, IFormActions, IWorkflowDocumentPicker, IBasicFormInput, IFileUploadInput, IDateRangePickerInput, ITextareaProperties, IToggleInput, IMatrixInput, IMultiple, FormSlideInterface, IGetTreeResponse, DialogConfig, IFormsInitStateInterface, IStoreFunctions, FormsStoreSelectorsInterface, FormListSection, LocalFormStateSelectorInterface, ConfigurationValidTestInterface, IWorkflowOption, BlurHandleTypes, FlatNode, ITowerStepColumn, FormBuilderFunctions, ElementTypes, DocumentLitsLabelConfigInterfaceValueType, InputDataTypes, InputPipeTypes, FileUploadInputValueInterface, IArrayFunction } from 'ngx-t-forms-types';
5
- import { FormGroup, AbstractControl, FormControl } from '@angular/forms';
6
- import { IStepOption } from 'ngx-ui-tour-md-menu';
4
+ import { NgxTFormsConfig, IFormActions, FormInterface, FormSlideInterface, InClassFormUtilsInterface, IWorkflowDocumentPicker, IBasicFormInput, IFileUploadInput, IDateRangePickerInput, ITextareaProperties, IToggleInput, IMatrixInput, IMultiple, IGetTreeResponse, IRunPipelineResponse, IPipelineGenerationResponse, LocalFormStateSelectorInterface, FormsStoreSelectorsInterface, FormListSection, WorkflowFunctionTypes, FileData, FormSubmissionStatus, IFormValidationOverride, FormColumnInputs, IFormChangeHistory, FormBuilderFunctions, ITowerFormSteps, ElementEditorTypes, ElementEditorInnerSectionElementInterface, ScoaInnerInput, IWorkflowOption, BlurHandleTypes, ITowerStepColumn, TreeNode, FlatNode, IArrayFunction, DocumentLitsLabelConfigInterfaceValueType, InputDataTypes, InputPipeTypes, ImportProgress, ImportRowState, ValidationError, FormInputBasicOptionInterface, ElementTypes, DialogConfig, PropertyPath, DeepPropertyValue, FileUploadInputValueInterface, FormInterfaceMigration, ConfigurationValidTestInterface, EncryptedData } from 'ngx-t-forms-types';
5
+ export { BlurHandleTypes, ConfigurationValidTestInterface, DeepPropertyValue, DialogConfig, DocumentLitsLabelConfigInterfaceValueType, ElementEditorInnerSectionElementInterface, ElementEditorTypes, EncryptedData, FileUploadInputValueInterface, FormBuilderFunctions, FormColumnInputs, FormInterface, FormInterfaceMigration, FormListSection, FormSubmissionStatus, IArrayFunction, IFormActions, IFormChangeHistory, IFormTour, IFormValidationOverride, IGetTreeResponse, IScoaAccount, ITowerStepColumn, IWorkflowOption, ImportProgress, ImportRowState, ImportRowStatus, InClassFormUtilsInterface, InputDataTypes, InputPipeTypes, LocalFormStateSelectorInterface, NgxTFormsConfig, OLD_FormInterface, PropertyPath, TreeNode, ValidationError, WorkflowFunctionTypes } from 'ngx-t-forms-types';
7
6
  import * as rxjs from 'rxjs';
8
- import { Observable, Subject, Subscription, BehaviorSubject } from 'rxjs';
9
- import { HttpClient } from '@angular/common/http';
7
+ import { Observable, Subject } from 'rxjs';
8
+ import { PipelineStage } from 'mongoose';
9
+ import { Router, ActivatedRoute } from '@angular/router';
10
+ import { MatStepper } from '@angular/material/stepper';
10
11
  import { StepperSelectionEvent, StepState } from '@angular/cdk/stepper';
11
- import { MatDialogRef } from '@angular/material/dialog';
12
- import * as _angular_cdk_drag_drop from '@angular/cdk/drag-drop';
13
- import * as _angular_router from '@angular/router';
14
- import { ActivatedRoute, Router } from '@angular/router';
15
- import { ComponentStore } from '@ngrx/component-store';
16
- import { MatSnackBar } from '@angular/material/snack-bar';
12
+ import { HttpClient } from '@angular/common/http';
13
+ import { FormGroup, FormControl } from '@angular/forms';
14
+ import * as ngx_ui_tour_md_menu from 'ngx-ui-tour-md-menu';
15
+ import { IStepOption } from 'ngx-ui-tour-md-menu';
17
16
  import { FlatTreeControl } from '@angular/cdk/tree';
18
17
  import { MatTreeFlattener, MatTreeFlatDataSource } from '@angular/material/tree';
19
- import { MatStepper } from '@angular/material/stepper';
20
- import * as ngx_ui_tour_core from 'ngx-ui-tour-core';
18
+ import { MatDialogRef } from '@angular/material/dialog';
21
19
 
22
- declare class NgxTFormsService {
23
- constructor();
24
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxTFormsService, never>;
25
- static ɵprov: i0.ɵɵInjectableDeclaration<NgxTFormsService>;
20
+ /** @internal */
21
+ declare const enum NgxTFormsFeatureKind {
22
+ SilencedConsole = 0,
23
+ FormBuilder = 1,
24
+ ImportTower = 2,
25
+ HttpPipeline = 3,
26
+ InputSecret = 4,
27
+ RouterFormId = 5
26
28
  }
29
+ interface NgxTFormsFeature {
30
+ readonly kind: NgxTFormsFeatureKind;
31
+ readonly providers: Provider[];
32
+ }
33
+ /**
34
+ * Registers ngx-t-forms with the application injector.
35
+ *
36
+ * @param config Runtime configuration (form actions, builder, etc.).
37
+ * @param features Optional with*() extension features.
38
+ * @returns EnvironmentProviders ready to drop into `bootstrapApplication`.
39
+ *
40
+ * @example
41
+ * bootstrapApplication(AppComponent, {
42
+ * providers: [
43
+ * provideNgxTForms(myConfig, withSilencedConsole(), withFormBuilder()),
44
+ * ],
45
+ * });
46
+ */
47
+ declare function provideNgxTForms(config: NgxTFormsConfig, ...features: NgxTFormsFeature[]): EnvironmentProviders;
27
48
 
28
- declare class NgxTFormsComponent {
29
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxTFormsComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxTFormsComponent, "lib-ngx-t-forms", never, {}, {}, never, never, true, never>;
49
+ /**
50
+ * @public
51
+ *
52
+ * Binds the default HTTP-backed {@link HttpPipelineRepository} to
53
+ * {@link PIPELINE_REPOSITORY}. Required when the consumer uses any
54
+ * pipeline-running feature (e.g. the pipeline-generator UI) and wants the
55
+ * built-in HTTP transport.
56
+ *
57
+ * Consumers that supply their own {@link PipelineRepository} implementation
58
+ * should bind it directly to {@link PIPELINE_REPOSITORY} instead of (or after)
59
+ * calling this — provider order resolution applies.
60
+ *
61
+ * @example
62
+ * bootstrapApplication(AppComponent, {
63
+ * providers: [
64
+ * provideHttpClient(),
65
+ * provideNgxTForms(config, withHttpPipeline()),
66
+ * ],
67
+ * });
68
+ */
69
+ declare function withHttpPipeline(): NgxTFormsFeature;
70
+
71
+ /**
72
+ * Registers the HMAC secret used to derive per-input encryption keys for the
73
+ * signature input. Required only when the signature input is in use — if the
74
+ * token is unbound at the point of encryption/decryption the library throws a
75
+ * clear error rather than silently falling back to a baked-in default.
76
+ *
77
+ * @param secret High-entropy string supplied by the consumer (e.g. read from
78
+ * their own `environment.ts` or a runtime config endpoint).
79
+ *
80
+ * @example
81
+ * provideNgxTForms(
82
+ * myConfig,
83
+ * withInputSecret(environment.ngxTFormsInputSecret),
84
+ * )
85
+ */
86
+ declare function withInputSecret(secret: string): NgxTFormsFeature;
87
+
88
+ /**
89
+ * Feeds {@link FormBuilderComponent} its `formId` from the activated route,
90
+ * preserving the historical route-driven form loading. Shipped by default in
91
+ * `provideNgxTForms`, so existing consumers see identical behaviour (D-B2 / §5.5);
92
+ * a router-free build resolves {@link FORM_ROUTE_SOURCE} to `EMPTY` and the
93
+ * builder loads from its `formId` input only.
94
+ *
95
+ * @example
96
+ * provideNgxTForms(config, withRouterFormId())
97
+ *
98
+ * @public
99
+ */
100
+ declare function withRouterFormId(): NgxTFormsFeature;
101
+
102
+ /**
103
+ * Provides the action handlers (submit, save, cancel, etc.) that the forms
104
+ * runtime invokes when the user interacts with form controls. Bound from the
105
+ * `formActions` field of `NgxTFormsConfig` when the consumer calls
106
+ * `provideNgxTForms`.
107
+ *
108
+ * @see provideNgxTForms
109
+ */
110
+ declare const FORM_ACTIONS_TOKEN: InjectionToken<IFormActions>;
111
+
112
+ /**
113
+ * Provides the active `FormInterface` definition rendered by the forms
114
+ * runtime. Components downstream of the form host inject this token to read
115
+ * the form configuration without coupling to the store.
116
+ *
117
+ * @see provideNgxTForms
118
+ */
119
+ declare const FORM_CONFIG_TOKEN: InjectionToken<FormInterface>;
120
+
121
+ /**
122
+ * Provides the active `FormSlideInterface` (the slide/step currently being
123
+ * rendered). Scoped per slide by the form host so individual inputs can read
124
+ * their slide context.
125
+ *
126
+ * @see provideNgxTForms
127
+ */
128
+ declare const FORM_SLIDES_TOKEN: InjectionToken<FormSlideInterface>;
129
+
130
+ /**
131
+ * Provides the in-class utility object (`InClassFormUtilsInterface`) that
132
+ * exposes shared helper functions to form input components — formatting,
133
+ * validation helpers, and cross-input lookups.
134
+ *
135
+ * @see provideNgxTForms
136
+ */
137
+ declare const UTILS_OBJECT_TOKEN: InjectionToken<InClassFormUtilsInterface>;
138
+
139
+ /**
140
+ * Provides the merged form-input descriptor injected into each individual
141
+ * input element. The descriptor is an intersection of every supported input
142
+ * shape (`IWorkflowDocumentPicker & IBasicFormInput & IFileUploadInput &
143
+ * IDateRangePickerInput & ITextareaProperties & IToggleInput & IMatrixInput
144
+ * & IMultiple`) so a single token can describe any rendered input.
145
+ *
146
+ * @see provideNgxTForms
147
+ */
148
+ declare const FORM_INPUTS_TOKEN: InjectionToken<IWorkflowDocumentPicker & IBasicFormInput & IFileUploadInput & IDateRangePickerInput & ITextareaProperties & IToggleInput & IMatrixInput & IMultiple>;
149
+
150
+ /**
151
+ * Provides the `IMultiple` configuration to "multiple"-type inputs (inputs
152
+ * that produce an array of values). Scoped per input instance.
153
+ *
154
+ * @see provideNgxTForms
155
+ */
156
+ declare const MULTIPLE_FORM_INPUT_TOKEN: InjectionToken<IMultiple>;
157
+
158
+ /**
159
+ * Provides a factory function that returns an `Observable<IGetTreeResponse>`
160
+ * representing the MSCOA chart-of-accounts tree. Consumers bind this token
161
+ * to their backend lookup so MSCOA-aware inputs can lazily fetch the tree
162
+ * without depending on a concrete HTTP client.
163
+ *
164
+ * @see provideNgxTForms
165
+ */
166
+ declare const MSCOA_TREE_PROVIDER: InjectionToken<() => Observable<IGetTreeResponse>>;
167
+
168
+ /**
169
+ * Provides the top-level `NgxTFormsConfig` supplied by the consumer when
170
+ * calling `provideNgxTForms`. This is the root configuration token from
171
+ * which `formActions`, `formBuilder`, and other runtime concerns are read.
172
+ *
173
+ * @see provideNgxTForms
174
+ */
175
+ declare const NGX_T_FORMS_CONFIG_TOKEN: InjectionToken<NgxTFormsConfig>;
176
+
177
+ /**
178
+ * @public
179
+ *
180
+ * Abstract repository for MongoDB-aggregation-pipeline operations used by the
181
+ * library's pipeline-generator UI. The default HTTP-backed implementation is
182
+ * {@link HttpPipelineRepository}, bound by {@link withHttpPipeline}.
183
+ *
184
+ * Consumers may bind a custom implementation against
185
+ * {@link PIPELINE_REPOSITORY} (e.g. for offline / mocked environments) by
186
+ * providing an alternative `useClass` against the same token instead of (or
187
+ * after) `withHttpPipeline()`.
188
+ *
189
+ * Only the methods that cross the HTTP boundary are abstracted here; pipeline
190
+ * orchestration state (`pipeline$`, `chatHistory$`, etc.) remains inside the
191
+ * adapter / generator UI per LP §9 (the repository owns I/O, not UI state).
192
+ */
193
+ declare abstract class PipelineRepository {
194
+ /**
195
+ * Execute the given aggregation pipeline against the configured backend for
196
+ * the supplied workflow.
197
+ *
198
+ * @param pipeline - Validated MongoDB aggregation stages to run.
199
+ * @param workflowId - Identifier of the workflow whose schema the pipeline
200
+ * targets.
201
+ * @returns An observable that emits exactly one {@link IRunPipelineResponse}
202
+ * then completes. Errors surface as a typed Error.
203
+ */
204
+ abstract runPipeline(pipeline: PipelineStage[], workflowId: string): Observable<IRunPipelineResponse>;
205
+ /**
206
+ * Ask the configured backend to generate (or refine) an aggregation pipeline
207
+ * from a natural-language query plus the workflow's document schema.
208
+ *
209
+ * @param query - The user's prompt.
210
+ * @param schema - Document schema the generator should target.
211
+ * @param threadId - Optional generator-session id (continues an in-flight
212
+ * chat).
213
+ * @param existingPipeline - The pipeline-so-far, for incremental refinement.
214
+ * @param previousError - The last execution error to feed back into the
215
+ * model, when applicable.
216
+ */
217
+ abstract generatePipeline(query: string, schema: object, threadId: string | undefined, existingPipeline: PipelineStage[], previousError: string): Observable<IPipelineGenerationResponse>;
218
+ /**
219
+ * Fetch the document schema for the supplied workflow.
220
+ *
221
+ * @param workflowId - Identifier of the workflow whose schema to load.
222
+ */
223
+ abstract getSchema(workflowId: string): Observable<{
224
+ schema: object;
225
+ }>;
31
226
  }
32
227
 
33
- declare const initFormConfigToV2: (formConfig: OLD_FormInterface) => FormInterface;
228
+ /**
229
+ * @public
230
+ *
231
+ * Token binding the {@link PipelineRepository} abstraction. The default
232
+ * HTTP-backed implementation is {@link HttpPipelineRepository}, registered by
233
+ * {@link withHttpPipeline}. Consumers may substitute their own implementation
234
+ * by binding `useClass` (or `useValue` for a mock) against this token.
235
+ */
236
+ declare const PIPELINE_REPOSITORY: InjectionToken<PipelineRepository>;
237
+
238
+ /**
239
+ * Secret used to derive per-input HMAC keys for client-side encryption of
240
+ * sensitive form values (currently: signature input payloads).
241
+ *
242
+ * Consumers MUST configure this via {@link withInputSecret} when the
243
+ * signature input is in use. The library does not ship a default — hardcoding
244
+ * a secret inside a published library would render it public.
245
+ *
246
+ * Treat the value as opaque, high-entropy, and never derived from anything
247
+ * the browser can read (e.g. `environment.ts` baked into the bundle is
248
+ * acceptable for low-sensitivity rotation; HSM-backed values are better).
249
+ *
250
+ * @see withInputSecret
251
+ */
252
+ declare const INPUT_SECRET_TOKEN: InjectionToken<string>;
34
253
 
35
- declare function provideNgxTForms(config: NgxTFormsConfig): EnvironmentProviders;
254
+ /**
255
+ * Optional source of the form id to load into {@link FormBuilderComponent}.
256
+ *
257
+ * Bound by `withRouterFormId()` (shipped by default in `provideNgxTForms`) to the
258
+ * activated route's `formId` param. When unbound — e.g. a router-free build — the
259
+ * builder loads from its `formId` input only. This decouples the builder from a
260
+ * direct `ActivatedRoute` dependency (plan D-B2 / §5.5).
261
+ *
262
+ * @public
263
+ */
264
+ declare const FORM_ROUTE_SOURCE: InjectionToken<Observable<string | undefined>>;
36
265
 
37
266
  /**
38
- * Generates a hierarchical form with nested FormGroups based on section IDs.
39
- * Parent form listens to all descendant changes, with validation cascading upward.
267
+ * @public
40
268
  *
41
- * @param inputs Array of form inputs with their configurations
42
- * @param getFormValue Record of form values used for custom validation
43
- * @returns A FormGroup with nested FormGroups for each section
269
+ * Default HTTP-backed implementation of {@link PipelineRepository}. Bound by
270
+ * {@link withHttpPipeline}; consumers needing a different transport should
271
+ * provide their own implementation against {@link PIPELINE_REPOSITORY}.
272
+ *
273
+ * The endpoint host (`http://localhost:5000`) is preserved from the pre-Phase-2
274
+ * `PipelineService` for I-1 parity. Configurable endpoints are tracked for a
275
+ * later phase — do not widen this surface ad-hoc.
44
276
  */
45
- declare function formGenerator(inputs: Array<FormColumnInputs>, getFormValue: () => Record<string, any>): FormGroup;
277
+ declare class HttpPipelineRepository implements PipelineRepository {
278
+ #private;
279
+ runPipeline(pipeline: PipelineStage[], workflowId: string): Observable<IRunPipelineResponse>;
280
+ generatePipeline(query: string, schema: object, threadId: string | undefined, existingPipeline: PipelineStage[], previousError: string): Observable<IPipelineGenerationResponse>;
281
+ getSchema(workflowId: string): Observable<{
282
+ schema: object;
283
+ }>;
284
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HttpPipelineRepository, never>;
285
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<HttpPipelineRepository>;
286
+ }
46
287
 
47
- interface IFormTour extends IStepOption {
48
- sectionId: string;
288
+ /**
289
+ * Renders the list of forms a user can open, edit, or build, with search,
290
+ * grouping (system vs custom), and section switching (active / archived /
291
+ * deleted) wired through the consumer-supplied `formBuilder` config.
292
+ *
293
+ * @remarks
294
+ * The component reads its data from `FormsStoreService` (provided locally)
295
+ * and reads the consumer's `NgxTFormsConfig` from {@link NGX_T_FORMS_CONFIG_TOKEN}
296
+ * to discover the close-button template and form CRUD callbacks
297
+ * (`editForm`, `addNewForm`).
298
+ *
299
+ * Inputs:
300
+ * - _None._ The component is driven entirely by the activated route and
301
+ * the injected forms store.
302
+ *
303
+ * Outputs:
304
+ * - _None._ User intents (archive / unarchive / delete / edit / add) are
305
+ * delegated to the store and to the consumer's `formBuilder` config.
306
+ */
307
+ declare class FormsComponent implements OnInit {
308
+ #private;
309
+ selectFormsList$: Observable<LocalFormStateSelectorInterface[]>;
310
+ selectGroupedForms$: Observable<Record<string, LocalFormStateSelectorInterface[]>>;
311
+ searchQuery$: Observable<string>;
312
+ selectHasActiveSearch$: Observable<boolean>;
313
+ selectFilteredGroupedForms$: Observable<Record<string, LocalFormStateSelectorInterface[]>>;
314
+ selectLoadingForms$: Observable<boolean>;
315
+ selectErrors$: FormsStoreSelectorsInterface['selectErrors$'];
316
+ selectFormListSection$: Observable<FormListSection>;
317
+ NGX_T_FORMS_CONFIG: ngx_t_forms_types.NgxTFormsConfig;
318
+ closeButton: ngx_t_forms_types.ActionButton;
319
+ get formListSections(): Array<{
320
+ value: FormListSection;
321
+ label: string;
322
+ }>;
323
+ viewportWidth: number;
324
+ ngOnInit(): void;
325
+ labels: {
326
+ label: string;
327
+ formControlName: string;
328
+ }[];
329
+ activeForm: string | null;
330
+ getCols(): number;
331
+ getFormAvatar(formTitle: string): string;
332
+ archive(form: LocalFormStateSelectorInterface, event: Event): Promise<void>;
333
+ unarchive(form: LocalFormStateSelectorInterface, event: Event): Promise<void>;
334
+ delete(form: LocalFormStateSelectorInterface, event: Event): Promise<void>;
335
+ loadForms(): void;
336
+ router: Router;
337
+ activatedRoute: ActivatedRoute;
338
+ setSection(value: FormListSection): void;
339
+ editForm(form: LocalFormStateSelectorInterface): void;
340
+ addNewForm(): void;
341
+ clearSearch(): void;
342
+ get searchQuery(): string;
343
+ set searchQuery(v: string);
344
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormsComponent, never>;
345
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormsComponent, "lib-forms, app-forms", never, {}, {}, never, never, true, never>;
49
346
  }
50
347
 
51
- declare enum FunctionTypes {
52
- ValueCalculation = "ValueCalculation",
53
- ValuePostMethodAPI = "ValuePostMethodAPI",
54
- ValuePostMethodAPIWithAllDefaultParams = "ValuePostMethodAPIWithAllDefaultParams",
55
- OptionsPostMethodAPI = "OptionsPostMethodAPI",
56
- OptionsPostMethodAPIWithAllDefaultParams = "OptionsPostMethodAPIWithAllDefaultParams",
57
- ValueGetMethodAPI = "ValueGetMethodAPI",
58
- OptionsGetMethodAPI = "OptionsGetMethodAPI",
59
- InputSourcedValue = "InputSourcedValue",
60
- ManualValueValidation = "ManualValueValidation"
348
+ /**
349
+ * Editor surface for authoring a form definition — sections, steps, and
350
+ * the individual inputs in each step. Hosts the section stepper, input
351
+ * editor, builder menu, and missing-config diagnostics.
352
+ *
353
+ * @remarks
354
+ * The component reads its state and effects from a locally provided
355
+ * `FormsStoreService` and pulls the consumer-supplied close-button template
356
+ * from {@link NGX_T_FORMS_CONFIG_TOKEN}. Form loading is driven either by
357
+ * the `formId` input or by the activated route's `formId` param.
358
+ *
359
+ * Inputs:
360
+ * - `formId: string` (optional) — when set, triggers `loadForm$` on the store.
361
+ *
362
+ * Outputs:
363
+ * - _None._ All save/refresh intents are dispatched through the local store.
364
+ *
365
+ * @public
366
+ * @deprecated Migrating to the strict library mandates. Public surface is
367
+ * preserved verbatim; internal authoring is being refactored.
368
+ */
369
+ declare class FormBuilderComponent {
370
+ #private;
371
+ /** Form-load spinner. */
372
+ readonly selectLoadingForm: _angular_core.Signal<boolean>;
373
+ /** Builder busy (saving / mutating). */
374
+ readonly selectFormBuilderIsBusy: _angular_core.Signal<boolean>;
375
+ /** "Updated N days ago" label, or null. */
376
+ readonly selectFormUpdated: _angular_core.Signal<string | Date | null>;
377
+ /** Whether the current form passes validation and can be saved. */
378
+ readonly canSaveForm: _angular_core.Signal<boolean>;
379
+ /** Whether the form in edit is unsaved (no formId yet). */
380
+ readonly isNewForm: _angular_core.Signal<boolean>;
381
+ /** Optional form identifier. When set, triggers `loadForm$` on the local store. */
382
+ readonly formId: _angular_core.InputSignal<string | undefined>;
383
+ /** Whether a form id is present in the store. */
384
+ readonly selectHasFormId: _angular_core.Signal<boolean>;
385
+ /** Whether the form has missing/invalid configuration. */
386
+ readonly hasMissingConfigs: _angular_core.Signal<boolean>;
387
+ /** Whether an input editor panel is currently open. */
388
+ readonly elementEditorOpen: _angular_core.Signal<boolean>;
389
+ pendingExternalRefresh: _angular_core.Signal<{
390
+ form: ngx_t_forms_types.FormInterface;
391
+ timestamp: Date;
392
+ } | null>;
393
+ refreshCountdown: _angular_core.WritableSignal<number>;
394
+ constructor();
395
+ triggerRefreshNow(): void;
396
+ readonly NGX_T_FORMS_CONFIG: ngx_t_forms_types.NgxTFormsConfig;
397
+ readonly closeButton: ngx_t_forms_types.ActionButton;
398
+ saveForm: () => void;
399
+ /** Editable form title — seeded from the store, overridable by local edits. */
400
+ protected readonly titleValue: _angular_core.WritableSignal<string>;
401
+ /** Pushes a title edit to the store (schedule-only refresh, matching `setFormTitle`). */
402
+ protected setTitleValue(value: string): void;
403
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilderComponent, never>;
404
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormBuilderComponent, "lib-form-builder, app-form-builder", never, { "formId": { "alias": "formId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
61
405
  }
62
406
 
407
+ /**
408
+ * Workflow function-type enum, upstreamed to `ngx-t-forms-types` as
409
+ * {@link WorkflowFunctionTypes} per DECISIONS.md D-016. Re-exported here under
410
+ * its historical name `FunctionTypes` to preserve every existing local import
411
+ * path (including the immutable `form-tower-controller.service.ts` per D-007).
412
+ *
413
+ * @public
414
+ */
415
+ declare const FunctionTypes: typeof WorkflowFunctionTypes;
416
+ type FunctionTypes = WorkflowFunctionTypes;
417
+
63
418
  declare enum HintType {
64
419
  WARNING = "warning",
65
420
  ERROR = "error",
@@ -80,82 +435,345 @@ declare enum HintType {
80
435
  DOCUMENT = "document",
81
436
  HISTORY = "history"
82
437
  }
438
+ /**
439
+ * @public
440
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
441
+ * barrel; remains functional. A renamed/improved replacement may be introduced
442
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
443
+ */
83
444
  declare function textIconsForUserHints(hint: string, type: HintType): string;
84
445
 
85
- interface DependentInput {
446
+ /**
447
+ * @file Pure helpers for the **overridable validation** submission gate.
448
+ *
449
+ * A custom validator declared with `canOverride === true` does not block
450
+ * submission outright. The gate distinguishes two error classes across the
451
+ * settled form:
452
+ *
453
+ * - **Blocking** — every error that is NOT an overridable custom-validator
454
+ * error: standard validators (`required`, `email`, `minlength`, …), MSCOA
455
+ * business-rule errors, and custom validators with `canOverride === false`.
456
+ * These MUST be resolved before the form can be submitted.
457
+ * - **Overridable** — a custom-validator error whose value object carries
458
+ * `canOverride === true`. The form may be submitted with these still failing
459
+ * **provided each one is motivated** with a non-empty comment.
460
+ *
461
+ * The error-record shape these helpers read is produced verbatim by the
462
+ * {@link FunctionTypes.ManualValueValidation} builder
463
+ * (`build-manual-validation.ts`): `{ [validatorId]: { message, canOverride } }`,
464
+ * merged onto `control.errors` by the W11 projection adapter. A validator id is
465
+ * a uuid unique per `(input, validator)`, so it uniquely keys an override
466
+ * reason.
467
+ *
468
+ * All functions here are pure reads over the projected `FormGroup` tree and the
469
+ * tower's `allFormInputs()` index — no signal writes, no Angular runtime
470
+ * primitives created. They are safe to call from template getters during change
471
+ * detection (mirrors `getSubmissionStatus.ts`).
472
+ */
473
+
474
+ /**
475
+ * A still-failing overridable custom validation surfaced to the override UI.
476
+ */
477
+ interface OverridableError {
478
+ /** The custom validator's id — the `control.errors` key and the reason key. */
479
+ validatorId: string;
480
+ /** The owning input's id (its control name within the section group). */
86
481
  inputId: string;
87
- functionType: FunctionTypes;
482
+ /** The owning input's `formControlName`, used to build the submission entry. */
483
+ formControlName: string;
484
+ /** The input's display label, for the override-reason prompt. */
485
+ label: string;
486
+ /** The validator's human-readable message. */
487
+ message: string;
488
+ }
489
+ /**
490
+ * A single captured override motivation, keyed in the engine by `validatorId`.
491
+ */
492
+ interface OverrideReason {
493
+ /** User-supplied motivation. Must be non-empty (trimmed) to unlock submission. */
494
+ comment: string;
495
+ /** Optional supporting file, carried as base64 {@link FileData}. */
496
+ attachment?: FileData;
88
497
  }
498
+ /** Map of `validatorId → captured reason`. The engine's override-reason state. */
499
+ type OverrideReasons = Record<string, OverrideReason>;
500
+
501
+ /**
502
+ * Core orchestrator for a runtime form (the "tower") — abstract because every
503
+ * concrete consumer (`TFormEngine`, the import row instance) extends it and
504
+ * Angular's DI provides {@link HttpClient} + {@link NGX_T_FORMS_CONFIG_TOKEN}.
505
+ *
506
+ * ### Lifecycle (Phase 1)
507
+ * 1. **{@link FormTowerControllerService.initialize}** — prepPopulate +
508
+ * loadSystemInputs + formGenerator + setFirstStepAsActive, then builds the
509
+ * per-input `#derived` signal graph (in injection context) and wires the
510
+ * FormGroup-projection + persist effects. There is NO `valueChanges`
511
+ * subscription and NO dependency-graph build.
512
+ * 2. **{@link FormTowerControllerService.initializeFormValues}** — writes
513
+ * user/import values into `#model` (tower-owned derived inputs are skipped
514
+ * structurally) and forces a liveness lead-read so lazy resources start.
515
+ * 3. User interaction / `updateValue` → writes `#model` (or a sourced
516
+ * `linkedSignal.set`) → derived signals + resources recompute automatically.
517
+ * 4. **{@link FormTowerControllerService.waitUntilSettled}** — used by headless
518
+ * consumers (import) to wait for all in-flight async work to drain.
519
+ * 5. **{@link FormTowerControllerService.ngOnDestroy}** — explicitly destroys
520
+ * every resource, the projection/persist effects, the `isBusy$`
521
+ * subscription, and clears hint/error timers.
522
+ *
523
+ * ### Why an abstract `@Directive()`?
524
+ * Angular requires the `@Directive()` decorator on classes that participate in
525
+ * DI inheritance + `OnDestroy`. Subclasses can be plain `@Injectable()` (see
526
+ * {@link TFormEngine}).
527
+ */
89
528
  declare abstract class FormTowerControllerService implements OnDestroy {
529
+ #private;
90
530
  private _http;
531
+ /** Resolved tower config (HTTP functions, file upload, getFinacialCycles, …). */
91
532
  readonly NGX_T_FORMS_CONFIG: ngx_t_forms_types.NgxTFormsConfig;
533
+ /** Convenience pass-through to the financial-cycles fetcher from config. */
92
534
  readonly getFinacialCycles: () => Observable<ngx_t_forms_types.IFinancialCycles>;
93
535
  constructor(_http: HttpClient);
536
+ /** Emits exactly once on tower destruction. `takeUntil` anchor for long-lived subscriptions. */
94
537
  protected _destroyed$: Subject<void>;
95
- protected _form: FormInterface | undefined;
538
+ /** Live root `FormGroup` — the Material carrier (Blueprint §2.7). Built by `formGenerator`. */
96
539
  protected _mainForm: FormGroup | undefined;
97
- private _activeStatusKeys;
98
- private _busyState$;
99
- private _syncBusyState;
100
- protected _formValue: Record<string, any>;
540
+ /** The values record last passed to {@link FormTowerControllerService.initializeFormValues}. */
101
541
  protected _initialFormValue: Record<string, any>;
102
- protected _systemInputs: FormColumnInputs[];
103
- protected _inputFunctionsCollection: Record<string, Partial<Record<FunctionTypes, Observable<void>>>>;
104
- protected _inputChangeDependencyRecords: Partial<Record<string, Partial<Record<FunctionTypes, Record<string, boolean>>>>>;
105
- protected _reverseDependencyMap: Record<string, DependentInput[]>;
106
- protected _changeHistory: IFormChangeHistory[];
542
+ /** Last reported submission state — drives the toolbar/spinner UI. */
107
543
  submittingStatus: FormSubmissionStatus | undefined;
108
- private _submittingForm;
544
+ /** True while a form submission is in flight. Counts toward {@link FormTowerControllerService.isBusy}. */
109
545
  get submittingForm(): boolean;
110
546
  set submittingForm(value: boolean);
547
+ /**
548
+ * The still-failing overridable (`canOverride === true`) validations on the
549
+ * settled form, one per failing validator, each carrying the input's
550
+ * `formControlName` / `label` and the validator message — the data the
551
+ * override-reason UI renders a motivation prompt from.
552
+ *
553
+ * Reads the projected control tree, so it reflects the latest validity. When
554
+ * there are blocking errors as well, those still prevent submission — see
555
+ * {@link FormTowerControllerService.canSubmit}.
556
+ */
557
+ overridableErrors: () => OverridableError[];
558
+ /**
559
+ * `true` when at least one blocking (non-overridable) error remains on the
560
+ * form. While this holds, submission is impossible regardless of motivations.
561
+ */
562
+ hasBlockingErrors: () => boolean;
563
+ /**
564
+ * Whether the form may be submitted: no blocking errors AND every overridable
565
+ * error has a non-empty motivation. Replaces the blunt `mainForm.invalid`
566
+ * submit gate — an overridable error with a reason no longer blocks.
567
+ */
568
+ canSubmit: () => boolean;
569
+ /** The currently captured override motivations, keyed by validator id. */
570
+ get overrideReasons(): OverrideReasons;
571
+ /**
572
+ * Records (or updates) the motivation comment for one overridable validation.
573
+ *
574
+ * @param validatorId - The validator's id (the `control.errors` key).
575
+ * @param comment - The user's motivation; an empty/whitespace value
576
+ * re-locks submission for that error.
577
+ */
578
+ setOverrideComment: (validatorId: string, comment: string) => void;
579
+ /**
580
+ * Attaches (or clears) a supporting file for one overridable validation.
581
+ *
582
+ * @param validatorId - The validator's id (the `control.errors` key).
583
+ * @param attachment - The base64 {@link FileData}, or `undefined` to clear.
584
+ */
585
+ setOverrideAttachment: (validatorId: string, attachment: FileData | undefined) => void;
586
+ /**
587
+ * Drops the captured reasons for the given validator ids. Called once a
588
+ * MultipleInput sub-row is saved — its motivations move from the live
589
+ * reason map into {@link FormTowerControllerService.#rowOverrides}, and the
590
+ * transient controls (and thus the live overridable errors) are removed.
591
+ *
592
+ * @param validatorIds - The validator ids whose live reasons to drop.
593
+ */
594
+ clearOverrideReasons: (validatorIds: readonly string[]) => void;
595
+ /**
596
+ * Records (or clears) the captured override entries for one MultipleInput
597
+ * sub-row. Replacing on every save keeps a re-edited row's motivations
598
+ * current; passing an empty list removes the row's entry.
599
+ *
600
+ * @param inputId - The MultipleInput's id.
601
+ * @param rowId - The sub-row's id (`${inputId}.id` value).
602
+ * @param entries - The override entries captured for the row.
603
+ */
604
+ setRowOverrides: (inputId: string, rowId: string, entries: IFormValidationOverride[]) => void;
605
+ /**
606
+ * Builds the override entries for the currently-open inner inputs of a
607
+ * MultipleInput sub-row, pairing each overridable error with its captured
608
+ * motivation. Returns the entries plus the validator ids consumed (so the
609
+ * caller can move them out of the live reason map after the row is saved).
610
+ *
611
+ * @param inputId - The MultipleInput's id.
612
+ * @param innerInputs - The sub-row's inner inputs (composite-id form inputs).
613
+ * @returns The sub-row's override state: motivated `entries` ready to persist,
614
+ * the `validatorIds` consumed, and the inner input ids that are blocking or
615
+ * still unmotivated (for save-gate messaging).
616
+ */
617
+ collectRowOverrideState: (inputId: string, innerInputs: FormColumnInputs[]) => {
618
+ entries: IFormValidationOverride[];
619
+ validatorIds: string[];
620
+ blockingInputIds: string[];
621
+ unmotivatedInputIds: string[];
622
+ };
623
+ /** The current form definition (post-{@link prepPopulateForm}). */
111
624
  get form(): FormInterface | undefined;
112
625
  set form(value: FormInterface | undefined);
113
- set systemInputs(value: FormColumnInputs[]);
626
+ /** System inputs loaded by `loadSystemInputs`, prepended to {@link FormTowerControllerService.allFormInputs}. */
114
627
  get systemInputs(): FormColumnInputs[];
628
+ set systemInputs(value: FormColumnInputs[]);
629
+ /** Live root `FormGroup` — `undefined` before {@link FormTowerControllerService.initialize}. */
115
630
  get mainForm(): FormGroup | undefined;
631
+ /** Append-only change history; used by {@link FormTowerControllerService.revertBackHistory}. */
116
632
  get changeHistory(): IFormChangeHistory[];
117
633
  set changeHistory(value: IFormChangeHistory[]);
118
- get inputFunctionsCollection(): Record<string, Partial<Record<FunctionTypes, Observable<void>>>>;
634
+ /**
635
+ * Busy iff a submission is in flight OR any value/options resource is
636
+ * `'loading'`. Reading every resource's `status()` here is what ACTIVATES the
637
+ * lazy resources — workers MUST NOT short-circuit before iterating
638
+ * (resource-activation contract, Blueprint §2.4 / HAZARD 2).
639
+ */
640
+ protected readonly isBusyComputed: Signal<boolean>;
641
+ /** Strict complement of {@link FormTowerControllerService.isBusyComputed}. */
642
+ protected readonly settled: Signal<boolean>;
643
+ /** Synchronous snapshot of the busy state. */
119
644
  get isBusy(): boolean;
120
645
  /**
121
- * Reactive stream of the tower's busy state.
122
- * Emits `true` whenever any calculation, API fetch, or validation is in flight,
123
- * or while the form is submitting. Emits `false` when all operations have settled.
646
+ * Reactive stream of the tower's busy state. Emits `true` while any
647
+ * calculation/API/validation is in flight or the form is submitting, `false`
648
+ * once everything settles. Backed by `toObservable(isBusy)`.
124
649
  */
125
650
  get isBusy$(): Observable<boolean>;
126
651
  /**
127
- * Resolves once the tower has finished all in-flight computations (calculations,
128
- * API fetches, input-sourced values, validations).
652
+ * Resolves once the tower has finished all in-flight async work (calculations,
653
+ * API fetches, sourced values). Used by headless consumers (import).
129
654
  *
130
- * Safe to use in import workflows:
131
- * ```ts
132
- * await tower.initialize(form);
133
- * tower.initializeFormValues(rowData);
134
- * await tower.waitUntilSettled(); // changeMonitor debounce + all ops complete
135
- * const value = tower.getFormValueNames();
136
- * ```
655
+ * **Contract (Blueprint §5 / §6, never changes):**
656
+ * - Performs a one-tick liveness lead-read FIRST (reads `value()` + every
657
+ * resource `status()` + flushes effects) so lazy resources start even when
658
+ * no template reads them (HAZARD 2).
659
+ * - Waits for the first `settled() === true` emission.
660
+ * - On `timeoutMs` it resolves with `undefined` — it NEVER rejects and NEVER
661
+ * hangs (`timeout` + `defaultIfEmpty`-equivalent via `catchError`).
137
662
  *
138
- * @param debounceMs Extra lead time matching the changeMonitor debounce (default 600ms).
139
- * @param timeoutMs Hard timeout before the promise rejects (default 30s).
663
+ * @param debounceMs - Accepted for signature parity; the signal graph needs no
664
+ * debounce, so it is treated as a no-op lead time.
665
+ * @param timeoutMs - Hard timeout before resolving with `undefined` (default 30s).
666
+ * @returns A promise that always resolves (with `void`).
140
667
  */
141
668
  waitUntilSettled(debounceMs?: number, timeoutMs?: number): Promise<void>;
669
+ /**
670
+ * Tears the tower down. Fires `_destroyed$`, runs
671
+ * {@link FormTowerControllerService.clearFormState} (which destroys resources
672
+ * + effects), completes the `isBusy$` subscription, and clears pending
673
+ * hint/error timers (HAZARD 7 / Blueprint §2.8).
674
+ */
142
675
  ngOnDestroy(): void;
143
- initialize: (form: FormInterface) => Promise<void>;
676
+ /**
677
+ * Boots the tower against a form definition.
678
+ *
679
+ * Performs, in order:
680
+ * 1. {@link FormTowerControllerService.clearFormState} — wipe prior state +
681
+ * destroy any prior resources/effects.
682
+ * 2. {@link prepPopulateForm} — merge `_initialFormValue` into the columns.
683
+ * 3. {@link loadSystemInputs} — load financial cycle, current user, etc.
684
+ * 4. {@link formGenerator} — build the nested `FormGroup` carrier.
685
+ * 5. Re-open any `MultipleInput` that was open before re-init.
686
+ * 6. Build the `#derived` signal graph + wire the projection/persist effects
687
+ * — ALL inside `runInInjectionContext(this.#injector, …)` (HAZARD 1).
688
+ *
689
+ * @param form - The form definition to drive.
690
+ * @param options - Optional behaviour flags.
691
+ * @param options.skipInitialFunctions - **Documented no-op (parity).** The
692
+ * old engine used this to suppress a premature change-monitor cycle in the
693
+ * headless import path. The signal graph has no such race (resources fire
694
+ * lazily once read; the liveness lead-read in
695
+ * {@link FormTowerControllerService.initializeFormValues} +
696
+ * {@link FormTowerControllerService.waitUntilSettled} activates them), so
697
+ * the flag is accepted for signature parity and otherwise ignored.
698
+ */
699
+ initialize: (form: FormInterface, options?: {
700
+ skipInitialFunctions?: boolean;
701
+ }) => Promise<void>;
702
+ /**
703
+ * Marks the form's first slide as active. Called during
704
+ * {@link FormTowerControllerService.initialize}.
705
+ */
144
706
  setFirstStepAsActive: () => void;
707
+ /**
708
+ * Returns the form's settled values keyed by **formControlName** (the
709
+ * canonical external shape). Reads {@link FormTowerControllerService.value}.
710
+ */
145
711
  getFormValueNames: () => Record<string, any>;
712
+ /**
713
+ * All form inputs that participate in the form, including system inputs.
714
+ * Returns a fresh outer array each call (preserves the prior contract that
715
+ * callers may mutate the returned array), but the expensive flatten beneath it
716
+ * is memoized by {@link FormTowerControllerService.#allInputsMemo}.
717
+ */
146
718
  readonly allFormInputs: () => FormColumnInputs[];
719
+ /** @deprecated unused field, kept for backwards compatibility. */
147
720
  prevValue: any;
148
- protected changeMonitor: (newFormValue: any) => Observable<any>;
149
- createInputFunctionsCollection: () => void;
150
- private buildReverseDependencyMap;
151
- createAllInputDependencies: () => void;
721
+ /**
722
+ * Mark a logical operation in flight for DOM badge rendering. Phase 1: no
723
+ * longer affects {@link FormTowerControllerService.isBusy} (busy is
724
+ * resource-derived) forwards to the DOM-status helper only.
725
+ */
152
726
  setInputStatus: (inputId: string, statusId: string, status: string) => void;
727
+ /** Companion to {@link FormTowerControllerService.setInputStatus} — clears the DOM badge. */
153
728
  removeInputStatus: (inputId: string, statusId: string) => void;
729
+ /**
730
+ * Programmatic write to a form input.
731
+ *
732
+ * - **Sourced inputs** (InputSourcedValue) → routes to the entry's writable
733
+ * `linkedSignal.set(value)` (transient override; reset on next source change).
734
+ * - **All other inputs** → writes `#model[inputId]`.
735
+ *
736
+ * Appends the change to history IMPERATIVELY (HAZARD 4). The projection effect
737
+ * patches the FormControl from the signal graph — this does NOT touch the
738
+ * FormGroup directly (no `valueChanges` feedback loop).
739
+ *
740
+ * @param inputId - The input to write.
741
+ * @param value - The new value.
742
+ */
154
743
  updateValue: (inputId: string, value: any) => void;
155
- getFunctionByType(fn: FunctionTypes, input: FormColumnInputs): Observable<void>;
744
+ /**
745
+ * Apply an external values record onto the form (user prefill / import row).
746
+ *
747
+ * Per input:
748
+ * - **Tower-owned non-MultipleInput** (calc/API/sourced) → SKIP structurally
749
+ * (it never enters `#model`; the derived signal/resource owns the value).
750
+ * - **MultipleInput** → ALWAYS apply the row array (its rows are user-authored
751
+ * source data). The array-remap branch is UNCHANGED (Phase 2 fence).
752
+ * - **Everything else** → write `#model` from the dotted-path or top-level value.
753
+ *
754
+ * Ends with a liveness lead-read so lazy resources start even in the headless
755
+ * import path (no template reader) — HAZARD 2 / Blueprint §2.7.
756
+ *
757
+ * @param initialValues - The external values record (formControlName-keyed).
758
+ */
759
+ initializeFormValues: (initialValues: Record<string, any>) => void;
760
+ /**
761
+ * Snapshot of the inputId-keyed flat form value. Re-points to the merged
762
+ * {@link FormTowerControllerService.value} computed (was the old `_formValue`).
763
+ * Passed to legacy helpers (refresh) that expect a `() => Record` accessor.
764
+ */
156
765
  getFormValue: () => Record<string, any>;
766
+ /**
767
+ * Resets all internal state — definition, FormGroup, signal graph (resources +
768
+ * effects destroyed), busy/model/history — so the tower can be re-initialized.
769
+ * Called at the start of {@link FormTowerControllerService.initialize} and from
770
+ * {@link FormTowerControllerService.ngOnDestroy}.
771
+ *
772
+ * Explicitly `.destroy()`s every `ResourceRef` and the projection/persist
773
+ * effects (HAZARD 7 / Blueprint §2.8 — per-row import towers are torn down by
774
+ * manual `ngOnDestroy`, not injector destruction).
775
+ */
157
776
  clearFormState: () => void;
158
- executeInputFunctionsWithoutDependencies: () => void;
159
777
  _hintTimeoutIds: Record<string, any>;
160
778
  setTemporaryHint: (inputId: string, hint: string, type: HintType) => void;
161
779
  _onFormInputConfigChange?: (inputId: string, config: FormColumnInputs) => void;
@@ -168,105 +786,519 @@ declare abstract class FormTowerControllerService implements OnDestroy {
168
786
  updateFormInputConfig: (inputId: string, config: FormColumnInputs) => void;
169
787
  handleStepChange: (event: StepperSelectionEvent) => void;
170
788
  selectFormSteps: () => ngx_t_forms_types.ITowerFormSteps[];
171
- selectAllFormTours: () => IFormTour[];
789
+ selectAllFormTours: () => ngx_t_forms_types.IFormTour[];
172
790
  setSectionAsSeen: (sectionId: string) => void;
173
791
  setSectionAsActive: (sectionId: string) => void;
174
792
  setInputAsTouchedAndDirty: (inputId: string) => void;
175
793
  formProgress: () => number;
176
794
  formSubmissionMessage: () => string;
177
795
  setSubmissionStatusValue: (status: FormSubmissionStatus) => FormSubmissionStatus;
178
- initializeFormValues: (initialValues: Record<string, any>) => void;
179
- reset(): void;
180
- revertBackHistory: () => void;
181
796
  /**
182
- * Form Submissions
797
+ * Legacy-shaped per-input function registry, reconstructed from `#derived`
798
+ * (Decision D3). Each present `(inputId, functionType)` maps to an
799
+ * `Observable<void>` that, on subscription, drives the underlying primitive:
800
+ * - resource/options entries → `.reload()` then complete when status leaves
801
+ * `'loading'`;
802
+ * - value/sourced/validation entries → a synchronous read then complete.
803
+ *
804
+ * Kept so `refreshInputWithDependencies` / `refreshInput` /
805
+ * `runMultipleInputPrepopulationFunctions` / `getTopologicalExecutionOrder`
806
+ * compile + behave unchanged. The return TYPE is unchanged (api:check parity).
183
807
  */
184
- submitForm: (passData: Record<string, any>) => void;
808
+ get inputFunctionsCollection(): Record<string, Partial<Record<FunctionTypes, Observable<void>>>>;
185
809
  /**
186
- * Toggles a multiple input element and its associated form controls.
187
- * When toggled on, adds controls to the form. When toggled off, removes them.
810
+ * Submits the form to the configured backend pipeline. Builds a payload by
811
+ * un-flattening the settled values, delegates to {@link formHttpSubmissions},
812
+ * and reports status. Errors surface as `FormSubmissionStatus.FAILED` — they
813
+ * do not throw to the caller.
188
814
  *
189
- * @param inputId The ID of the multiple input to toggle
190
- * @returns boolean indicating success or failure
815
+ * @param passData - Extra context handed through to the submission pipeline.
191
816
  */
817
+ submitForm: (passData: Record<string, any>) => void;
818
+ /** Toggle a MultipleInput element + its associated form controls. */
192
819
  toggleMultipleInput: (inputId: string, open: boolean, rowInEditId?: string) => boolean;
820
+ /** Persist the open MultipleInput sub-form back into the parent control's array value. */
193
821
  saveMultipleInputForm: (inputId: string) => boolean;
822
+ /** Open the MultipleInput sub-form prepopulated with `rowId`'s values. */
194
823
  multipleInputEditRow: (inputId: string, rowId: string) => boolean;
824
+ /** Duplicate `rowId` and open the sub-form on the new row. */
195
825
  multipleInputDuplicateRow: (inputId: string, rowId: string) => boolean;
196
- refreshSection: (sectionId: string) => Observable<void>;
197
- refreshActiveSection: () => void;
198
- refreshInput: (inputId: string) => Observable<undefined>;
199
- canRefreshFn: (inputId: string) => boolean;
200
- canRefreshSection: (sectionId: string) => boolean;
201
- static ɵfac: i0.ɵɵFactoryDeclaration<FormTowerControllerService, never>;
202
- static ɵdir: i0.ɵɵDirectiveDeclaration<FormTowerControllerService, never, never, {}, {}, never, never, true, never>;
203
- }
204
-
205
- declare function getSectionElements(elements: ElementEditorInnerSectionElementInterface[], inputInEdit: (FormColumnInputs) | undefined, NGX_T_FORMS_CONFIG: NgxTFormsConfig, utils: InClassFormUtilsInterface, errors?: ValidationError[]): (never[] | {
206
- computedErrors: ValidationError[];
207
- required: boolean;
208
- postmanCollectionConfig: {
209
- collectionUrl: string;
210
- collectionKey: string;
211
- } | undefined;
212
- httpGetDataFunction: (url: string, options: any) => rxjs.Observable<any>;
213
- getWorkflowOptions: rxjs.Observable<ngx_t_forms_types.IWorkflowOption[]>;
214
- getMscoaTree: rxjs.Observable<ngx_t_forms_types.IGetTreeResponse> | undefined;
215
- id: string;
216
- name: FormInputKeys | SpecialElementKeys | AllFormInputPrimaryKeys;
217
- hint?: string;
218
- editType: ElementEditorTypes;
219
- deepBind: Array<string>;
220
- defaultValue?: any;
221
- limitTo?: number;
222
- additionalTest?: ngx_t_forms_types.ConfigurationValidTestInterface[];
223
- disabled?: ngx_t_forms_types.ConfigurationValidTestInterface[];
224
- fetchOptions?: string[];
225
- secondaryElementEditorConfig?: Array<ngx_t_forms_types.ElementEditorConfigSectionInterface>;
226
- clearOnChange?: string[][];
227
- blurHandle?: ngx_t_forms_types.BlurHandleTypes;
228
- label: string;
229
- readonly?: boolean;
230
- templateOptions?: Array<any>;
231
- placeholder?: string;
232
- options?: Array<{
233
- label: string;
234
- value: any;
826
+ /**
827
+ * Bridges live edits of an OPEN MultipleInput sub-row into the signal graph.
828
+ *
829
+ * Subscribes every sub-row control (`${inputId}.${childId}`) except the
830
+ * `${inputId}.id` row-bookkeeping control — to `updateValue(controlName, )`,
831
+ * so a sub-row field behaves exactly like a primary-form input: dependent
832
+ * calculations / value-fetches / validators (whether they live in the same
833
+ * row or in the primary form) re-fire the moment a dependency changes.
834
+ *
835
+ * Idempotent per `inputId` (re-binding tears down the prior subscription
836
+ * first). Each inner subscription is `takeUntil(this._destroyed$)`-anchored so
837
+ * a re-init also drops it. Called by `toggleMultipleInput` on open; mirrored
838
+ * by {@link FormTowerControllerService.unbindMultipleInputRowControls} on close.
839
+ *
840
+ * @param inputId - The MultipleInput whose open sub-row controls to bridge.
841
+ */
842
+ bindMultipleInputRowControls: (inputId: string) => void;
843
+ /**
844
+ * Tears down the live sub-row `valueChanges` bridge wired by
845
+ * {@link FormTowerControllerService.bindMultipleInputRowControls}. Called by
846
+ * `toggleMultipleInput` on close (and implicitly on re-open / re-init).
847
+ *
848
+ * @param inputId - The MultipleInput whose sub-row bridge to drop.
849
+ */
850
+ unbindMultipleInputRowControls: (inputId: string) => void;
851
+ /**
852
+ * Bridges live edits of mSCOA inner inputs — the custom form inputs configured
853
+ * inside an `MscoaSelection` column (e.g. `budgetValue`, `department`) and
854
+ * rendered inline by the MSCOA chart via a `ComponentPortal` — into the signal
855
+ * graph.
856
+ *
857
+ * Each inner input is a `${mscoaColId}.${innerId}` control sitting in the mSCOA
858
+ * column's section group. The engine already lists it in `allFormInputs`, so
859
+ * its derived calc / value-API / options graph is built at init (the OUTPUT
860
+ * half). But a `ComponentPortal` forwards inputs only and never subscribes the
861
+ * host's `valueChange` output, so the user's typed value never reached `#model`
862
+ * — leaving dependent calculations / value-fetches / options blind to it. This
863
+ * subscribes each such control's `valueChanges` → `updateValue(controlName, …)`,
864
+ * restoring the INPUT half so an mSCOA custom input behaves exactly like a
865
+ * primary-form input. Direct mirror of
866
+ * {@link FormTowerControllerService.bindMultipleInputRowControls}.
867
+ *
868
+ * Idempotent (tears down the prior bridge first) and anchored to `_destroyed$`,
869
+ * so the re-init `clearFormState` drops every inner subscription.
870
+ */
871
+ bindScoaInnerInputControls: () => void;
872
+ /**
873
+ * Re-runs every refreshable function for inputs in `sectionId` (resource
874
+ * `.reload()` + dependency order). Returns an Observable that completes when
875
+ * the section's refresh chain drains.
876
+ *
877
+ * @param sectionId - The section to refresh.
878
+ * @returns An Observable completing when the section is refreshed.
879
+ */
880
+ refreshSection: (sectionId: string) => Observable<any>;
881
+ /**
882
+ * Fire-and-forget refresh of whichever slide is currently active. Returns
883
+ * `void` (parity — the consumer-map row claiming `Observable<any>` is wrong).
884
+ */
885
+ refreshActiveSection: () => void;
886
+ /**
887
+ * Refresh a single input plus everything it transitively depends on.
888
+ *
889
+ * @param inputId - The input to refresh.
890
+ * @returns An Observable completing when the refresh drains.
891
+ */
892
+ refreshInput: (inputId: string) => Observable<void>;
893
+ /** True iff the input has at least one refreshable `#derived` entry. */
894
+ canRefreshFn: (inputId: string) => boolean;
895
+ /**
896
+ * True iff any input in the section is refreshable. The HTML refresh-button
897
+ * gate (`user-form-stepper.component.html`) depends on this exact truth value
898
+ * (Blueprint §4 / W13).
899
+ */
900
+ canRefreshSection: (sectionId: string) => boolean;
901
+ /**
902
+ * Pop the last change-history entry and re-apply the PRIOR snapshot via
903
+ * {@link FormTowerControllerService.updateValue} (restores to second-to-last,
904
+ * matching the old semantics exactly). Decorates each restored input with a
905
+ * transient hint. History append stays imperative (HAZARD 4).
906
+ */
907
+ revertBackHistory: () => void;
908
+ /**
909
+ * Hard reset: tear down current state and re-initialize from the same form
910
+ * definition + originally supplied values.
911
+ *
912
+ * **D4 (deliberate, signed-off):** AWAITS `initialize(form)` BEFORE calling
913
+ * `initializeFormValues(...)`, fixing the old unawaited mis-ordering where
914
+ * `initializeFormValues` could run before `_mainForm` was rebuilt. The public
915
+ * signature is unchanged.
916
+ */
917
+ reset(): void;
918
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormTowerControllerService, never>;
919
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FormTowerControllerService, never, never, {}, {}, never, never, true, never>;
920
+ }
921
+
922
+ /**
923
+ * Per-component runtime form engine.
924
+ *
925
+ * `TFormEngine` is the **composition seam** introduced by SIGNAL_FORMS migration
926
+ * Phase 0 (see `docs/migration/SIGNAL_FORMS_MIGRATION_PLAN.md` §5.1/§6.0 and
927
+ * DECISIONS.md D-023/D-025). Consumers previously **extended**
928
+ * {@link FormTowerControllerService} directly; they now **hold** a `TFormEngine`
929
+ * instance via `inject(TFormEngine)` (provided per-component, not
930
+ * `providedIn: 'root'`) and reach the tower's surface through it.
931
+ *
932
+ * Phase 0 moves **no logic**: this façade is a thin subclass of the existing
933
+ * tower so the full member surface is preserved verbatim and consumer behaviour
934
+ * stays under the I-1 Parity invariant. Phase 1 will rewrite the tower internals
935
+ * behind this same façade without touching the three consumers again.
936
+ *
937
+ * Internal to the library — not part of the public API. Provide it on the
938
+ * component that needs it:
939
+ *
940
+ * @example
941
+ * @Component({
942
+ * // …
943
+ * providers: [TFormEngine],
944
+ * })
945
+ * export class UserFormStepperComponent {
946
+ * protected readonly engine = inject(TFormEngine);
947
+ * }
948
+ */
949
+ declare class TFormEngine extends FormTowerControllerService {
950
+ constructor(http: HttpClient);
951
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TFormEngine, never>;
952
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<TFormEngine>;
953
+ }
954
+
955
+ declare class TourManagerService {
956
+ private readonly tourService;
957
+ userProfile: this;
958
+ constructor();
959
+ startTourByOption(steps: IStepOption[]): {
960
+ stepShow$: rxjs.Subject<ngx_ui_tour_md_menu.StepChangeParams<IStepOption>>;
961
+ stepHide$: rxjs.Subject<ngx_ui_tour_md_menu.StepChangeParams<IStepOption>>;
962
+ initialize$: rxjs.Subject<IStepOption[]>;
963
+ start$: rxjs.Subject<void>;
964
+ end$: rxjs.Subject<void>;
965
+ pause$: rxjs.Subject<void>;
966
+ resume$: rxjs.Subject<void>;
967
+ };
968
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TourManagerService, never>;
969
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<TourManagerService>;
970
+ }
971
+
972
+ /**
973
+ * End-user surface for filling out a form. Extends `FormTowerControllerService`
974
+ * to drive a `MatStepper` of form sections and renders each section's inputs
975
+ * via `TFormInputComponent`. Loads the form definition through the consumer's
976
+ * `formBuilder.getForm` hook on `NgxTFormsConfig`, supports undo (Ctrl+Z),
977
+ * initial values, and per-instance global system inputs.
978
+ *
979
+ * Inputs:
980
+ * - `formId: string | undefined` — when set, fetches the form
981
+ * definition and initialises the tower controller.
982
+ * - `initialValues: Record<string, unknown> | undefined` — seed the form
983
+ * with previously captured values; only re-initialises when the value
984
+ * actually changes.
985
+ * - `globalSystemInputs: FormColumnInputs[]` — system-level inputs
986
+ * merged into every step of the form; re-initialises the form when set.
987
+ * - `passParamsOnSubmit: Record<string, unknown> | undefined` — extra params
988
+ * passed through to the consumer's submit handler.
989
+ *
990
+ * Outputs:
991
+ * - _None._ Submission and lifecycle events are dispatched through the
992
+ * inherited `FormTowerControllerService` and the consumer's
993
+ * `formActions` / `formBuilder` callbacks.
994
+ */
995
+ declare class UserFormStepperComponent {
996
+ #private;
997
+ /**
998
+ * Runtime form engine, held by composition (SIGNAL_FORMS Phase 0, D-025).
999
+ * Provided per-component instance; the component reaches the former
1000
+ * inherited tower surface through this façade.
1001
+ */
1002
+ protected readonly engine: TFormEngine;
1003
+ /** Form definition id; when set, the component fetches and initialises the form. */
1004
+ readonly formId: _angular_core.InputSignal<string | undefined>;
1005
+ /**
1006
+ * Seed values applied to the form once it is initialised.
1007
+ *
1008
+ * A keyed record of previously captured values (raw API payloads, partial
1009
+ * form values, nested objects). The downstream `initializeFormValues`
1010
+ * consumes the entries defensively; callers narrow specific value shapes.
1011
+ */
1012
+ readonly initialValues: _angular_core.InputSignal<Record<string, unknown> | undefined>;
1013
+ /** System-level inputs merged into every step of the form. */
1014
+ readonly globalSystemInputs: _angular_core.InputSignal<FormColumnInputs[]>;
1015
+ /**
1016
+ * Extra params forwarded to the consumer's submit handler.
1017
+ *
1018
+ * A keyed record merged into the submission payload; only meaningful to the
1019
+ * consumer's own submit handler, which narrows the individual values.
1020
+ */
1021
+ readonly passParamsOnSubmit: _angular_core.InputSignal<Record<string, unknown> | undefined>;
1022
+ /** Underlying Material stepper instance (may be undefined before first CD pass). */
1023
+ readonly stepper: _angular_core.Signal<MatStepper | undefined>;
1024
+ /** Whether the form is editable / can be navigated freely. */
1025
+ isEditable: boolean;
1026
+ /** True while the form definition is being fetched. */
1027
+ readonly loading: _angular_core.WritableSignal<boolean>;
1028
+ protected readonly tourManagerService: TourManagerService;
1029
+ protected readonly formIdBridge: _angular_core.EffectRef;
1030
+ protected readonly initialValuesBridge: _angular_core.EffectRef;
1031
+ protected readonly globalSystemInputsBridge: _angular_core.EffectRef;
1032
+ /**
1033
+ * Handles the key down event and reverts the form's last history entry on Ctrl+Z.
1034
+ * @param event The keyboard event object.
1035
+ */
1036
+ onKeyDown(event: KeyboardEvent): void;
1037
+ loadForm(formId: string | undefined): void;
1038
+ /**
1039
+ * Builder-function shim passed to inputs that need callbacks (e.g.
1040
+ * MultipleInput, MSCOA). The user form surface only implements the subset
1041
+ * relevant to runtime input editing; builder-only members (`editInput`,
1042
+ * `deleteInput`, `addFunction`, `reorderItems`, `multipleInputToggleLabel`)
1043
+ * are stubbed because they have no meaning outside the form builder.
1044
+ */
1045
+ get formBuilderFunctions(): FormBuilderFunctions;
1046
+ getStepState(step: ITowerFormSteps, index: number): StepState;
1047
+ getPreviousStepLabel(): string | undefined;
1048
+ getNextStepLabel(): string | undefined;
1049
+ canProceedToNextStep(step: ITowerFormSteps): boolean;
1050
+ get getSubmissionStatus(): string;
1051
+ handleSubmit(): void;
1052
+ /** Still-failing overridable validations the user may motivate to submit. */
1053
+ get overridableErrors(): OverridableError[];
1054
+ /** True while a blocking (non-overridable) error keeps submission impossible. */
1055
+ get hasBlockingErrors(): boolean;
1056
+ /** True once every blocking error is resolved and every override is motivated. */
1057
+ get canSubmit(): boolean;
1058
+ /** Current motivation text for one overridable validation (for two-way display). */
1059
+ overrideComment(validatorId: string): string;
1060
+ /** File name of the attachment captured for one overridable validation, if any. */
1061
+ overrideAttachmentName(validatorId: string): string | undefined;
1062
+ /** Records the motivation comment as the user types. */
1063
+ onOverrideComment(validatorId: string, event: Event): void;
1064
+ /**
1065
+ * Reads the chosen supporting file into a base64 {@link FileData} and attaches
1066
+ * it to the override; clearing the picker removes the attachment. Browser-only
1067
+ * (FileReader) — a no-op under SSR.
1068
+ */
1069
+ onOverrideAttachment(validatorId: string, event: Event): Promise<void>;
1070
+ get hasTour(): boolean;
1071
+ /**
1072
+ * Initiates and configures a dynamic, multi-step tutorial tour for the form.
1073
+ * The tour guides the user through the form's title, sections, and individual fields.
1074
+ */
1075
+ startTour(): void;
1076
+ refreshASection(sectionId: string): void;
1077
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserFormStepperComponent, never>;
1078
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserFormStepperComponent, "lib-user-form-stepper", never, { "formId": { "alias": "formId"; "required": false; "isSignal": true; }; "initialValues": { "alias": "initialValues"; "required": false; "isSignal": true; }; "globalSystemInputs": { "alias": "globalSystemInputs"; "required": false; "isSignal": true; }; "passParamsOnSubmit": { "alias": "passParamsOnSubmit"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1079
+ }
1080
+
1081
+ interface IConfigElementError {
1082
+ key: string;
1083
+ message: string;
1084
+ }
1085
+ /**
1086
+ * Builder-side editor for a single configurable property on a form input —
1087
+ * dispatches to the correct editor (selection options, REST API setup,
1088
+ * value-access rules, pipeline, validators, MSCOA segment config, slider,
1089
+ * chip list, data source picker, document list label config, workflow
1090
+ * picker, EditorJS, record list manager, etc.) based on the supplied
1091
+ * `ElementEditorInnerSectionElementInterface`.
1092
+ *
1093
+ * @remarks
1094
+ * Emits debounced value changes (and a separate `blur` event when the
1095
+ * editor is a free-text expression) so the form builder can persist edits
1096
+ * without re-reading the underlying form on every keystroke.
1097
+ *
1098
+ * Inputs:
1099
+ * - `editorConfig: ElementEditorInnerSectionElementInterface | undefined`
1100
+ * — descriptor of the editor to render.
1101
+ * - `formInputs: FormColumnInputs[]` — the set of inputs the
1102
+ * editor can reference (used by expression / value-access editors).
1103
+ * - `data: unknown` — current value being edited; resets the value
1104
+ * pipeline when changed by reference.
1105
+ * - `validationErrors: IConfigElementError[] | null` — validation errors
1106
+ * surfaced by the parent for display.
1107
+ *
1108
+ * Outputs:
1109
+ * - `valueChange` — fires when the edited value changes (debounced).
1110
+ * - `blur` — fires when an inner editor loses focus
1111
+ * (used for expression-style editors).
1112
+ */
1113
+ declare class TDynamicDataEditComponent {
1114
+ #private;
1115
+ protected readonly elementEditorTypes: typeof ElementEditorTypes;
1116
+ /** Descriptor of the editor to render. */
1117
+ readonly editorConfig: _angular_core.InputSignal<ElementEditorInnerSectionElementInterface | undefined>;
1118
+ /** The set of inputs the editor can reference (used by expression / value-access editors). */
1119
+ readonly formInputs: _angular_core.InputSignal<FormColumnInputs[]>;
1120
+ /**
1121
+ * Current value being edited; resets the value pipeline when changed by reference.
1122
+ * @remarks Heterogeneous across consumers (ITowerStepColumn, plain records, etc.),
1123
+ * so it is typed as a keyed record; the editor pipeline reads individual fields
1124
+ * via `deepBind` paths and callers narrow specific value shapes.
1125
+ */
1126
+ readonly data: _angular_core.InputSignal<unknown>;
1127
+ /** Validation errors surfaced by the parent for display. */
1128
+ readonly validationErrors: _angular_core.InputSignal<IConfigElementError[] | null>;
1129
+ /**
1130
+ * Builder-only: creates or updates an account-level MSCOA custom input (a peer
1131
+ * of the segments) from the segment-config quick editor. Forwarded to that
1132
+ * editor; absent outside the form builder, which hides the related affordance.
1133
+ */
1134
+ readonly mscoaSaveCustomInput: _angular_core.InputSignal<((sectionId: string, scoaInputId: string, config: Pick<ScoaInnerInput, "element" | "label" | "formControlName" | "singleSelect" | "readonly"> & {
1135
+ id?: string;
1136
+ }) => void) | undefined>;
1137
+ /** Builder-only: opens an MSCOA custom input in the input editor for advanced configuration. */
1138
+ readonly mscoaEditInput: _angular_core.InputSignal<((input: FormColumnInputs) => void) | undefined>;
1139
+ /** Builder-only: removes an MSCOA custom input from the config. */
1140
+ readonly mscoaDeleteInput: _angular_core.InputSignal<((input: FormColumnInputs) => void) | undefined>;
1141
+ /** Fires when the edited value changes (debounced). */
1142
+ readonly valueChange: _angular_core.OutputEmitterRef<unknown>;
1143
+ /** Fires when an inner editor loses focus (used for expression-style editors). */
1144
+ readonly blur: _angular_core.OutputEmitterRef<unknown>;
1145
+ protected readonly editorConfigBridge: _angular_core.EffectRef;
1146
+ protected readonly dataBridge: _angular_core.EffectRef;
1147
+ protected readonly editorConfigValue$: Observable<ElementEditorInnerSectionElementInterface | undefined>;
1148
+ protected readonly dataValue$: Observable<Record<string, unknown> | undefined>;
1149
+ protected get getMscoaTree$(): Observable<IGetTreeResponse | undefined>;
1150
+ protected get getWorkflowOptions$(): Observable<IWorkflowOption[] | undefined>;
1151
+ protected get value$(): Observable<{} | null>;
1152
+ protected get dataOptions$(): Observable<unknown>;
1153
+ protected get disabled$(): Observable<boolean | undefined>;
1154
+ inputChange(event: unknown): void;
1155
+ valueChanged(value: unknown): void;
1156
+ manualValueChange(event: {
1157
+ value: unknown;
1158
+ deepBind: Array<string>;
1159
+ }): void;
1160
+ blurOff: boolean;
1161
+ elementBlur(event: unknown): void;
1162
+ protected get inputHasBlurFunction$(): Observable<BlurHandleTypes | undefined>;
1163
+ blurFunctionTooltip(blurHandle: BlurHandleTypes | undefined): string;
1164
+ /** Slider label formatter — Mat slider's `displayWith` accepts `string | number`. */
1165
+ formatLabel: (value: number) => string | number;
1166
+ protected vm$: Observable<{
1167
+ editorConfigValue: ElementEditorInnerSectionElementInterface | undefined;
1168
+ isFormFieldControl: boolean;
1169
+ value: {} | null;
1170
+ dataOptions: any;
1171
+ disabled: boolean | undefined;
1172
+ inputHasBlurFunction: BlurHandleTypes | undefined;
1173
+ dataValue: Record<string, unknown> | undefined;
1174
+ inputConfig: Partial<ITowerStepColumn>;
235
1175
  }>;
236
- min?: number;
237
- max?: number;
238
- step?: number;
239
- format?: (value: any) => number;
240
- multipleSelection?: boolean;
241
- })[];
1176
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TDynamicDataEditComponent, never>;
1177
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TDynamicDataEditComponent, "lib-t-dynamic-data-edit", never, { "editorConfig": { "alias": "editorConfig"; "required": false; "isSignal": true; }; "formInputs": { "alias": "formInputs"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "validationErrors": { "alias": "validationErrors"; "required": false; "isSignal": true; }; "mscoaSaveCustomInput": { "alias": "mscoaSaveCustomInput"; "required": false; "isSignal": true; }; "mscoaEditInput": { "alias": "mscoaEditInput"; "required": false; "isSignal": true; }; "mscoaDeleteInput": { "alias": "mscoaDeleteInput"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "blur": "blur"; }, never, never, true, never>;
1178
+ }
242
1179
 
243
- declare const returnMappedPathValue: (pathMap: TreeNode[], obj: any) => any;
244
- declare const getValueFromValueAccessor: (valueAccessRules: FormInputBasicOptionInterface | TreeNode[] | Record<string, TreeNode[]>, data: any) => any;
1180
+ declare class TreeComponent {
1181
+ activePath: TreeNode[];
1182
+ pathInEdit: TreeNode | null;
1183
+ get activeLevel(): number;
1184
+ private _transformer;
1185
+ setupPath(node: TreeNode): void;
1186
+ updateStateFromPath(path: TreeNode[]): void;
1187
+ selectNode(node: FlatNode): TreeNode[] | undefined;
1188
+ saveNodeInEdit(): {
1189
+ children: undefined;
1190
+ value: undefined;
1191
+ key: string;
1192
+ name: string;
1193
+ inEdit?: boolean;
1194
+ path: string[];
1195
+ keyIsArrayIndex?: boolean;
1196
+ functions: IArrayFunction[];
1197
+ }[] | undefined;
1198
+ resetNode(): void;
1199
+ removeFunction(id: string): void;
1200
+ closeEdit(): void;
1201
+ nodeIsExpandable(node: TreeNode): boolean;
1202
+ showNode(node: FlatNode): boolean;
1203
+ hasANodeInEdit(): boolean;
1204
+ nodeIsChecked(node: FlatNode): boolean;
1205
+ treeControl: FlatTreeControl<FlatNode, FlatNode>;
1206
+ treeFlattener: MatTreeFlattener<TreeNode, FlatNode, FlatNode>;
1207
+ dataSource: MatTreeFlatDataSource<TreeNode, FlatNode, FlatNode>;
1208
+ private dynamicObject;
1209
+ constructor();
1210
+ computeTreeData(dynamicObject: unknown): void;
1211
+ assignDataSourceData(tree: TreeNode[]): void;
1212
+ hasChild: (_: number, node: FlatNode) => boolean;
1213
+ getValue(): unknown;
1214
+ addNewFunction(): void;
1215
+ functionChanged(value: string): void;
1216
+ }
1217
+
1218
+ /**
1219
+ * Read-only tree view for an arbitrary JSON-shaped value. Converts the input
1220
+ * into a flat tree (via `TreeComponent`) and renders each leaf with a typed
1221
+ * style class (`value-string`, `value-number`, `value-boolean`, `value-null`).
1222
+ */
1223
+ declare class TDynamicDataViewComponent {
1224
+ /** Arbitrary JSON-shaped value to render. Recomputes the tree on structural change. */
1225
+ readonly data: _angular_core.InputSignal<unknown>;
1226
+ protected readonly treeClass: TreeComponent;
1227
+ constructor();
1228
+ protected formatKey(key: string): string;
1229
+ protected getDisplayValue(value: unknown): string;
1230
+ protected getValueClass(value: unknown): string;
1231
+ protected getLevelArray(node: unknown): readonly number[];
1232
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TDynamicDataViewComponent, never>;
1233
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TDynamicDataViewComponent, "lib-t-dynamic-data-view", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1234
+ }
1235
+
1236
+ declare class FormatDataPipe implements PipeTransform {
1237
+ /**
1238
+ * Formats an arbitrary input value for display according to `dataType`.
1239
+ *
1240
+ * `value` is typed `unknown` (a pipe can be handed any binding) and each
1241
+ * branch narrows it to the shape it needs. The return is the set of
1242
+ * display-primitive types (`string | number | null | undefined`) so it
1243
+ * binds cleanly to interpolation and `matTooltip`; "passthrough" branches
1244
+ * return the original value (asserted to the display-primitive union — its
1245
+ * runtime value is unchanged and Angular string-coerces it for display).
1246
+ *
1247
+ * @param value - The raw value to format.
1248
+ * @param dataType - Which formatting branch to apply.
1249
+ * @param pipeConfig - Optional pipe configuration (currency code, nested pipe type).
1250
+ * @returns The formatted representation, or the original value when no formatting applies.
1251
+ */
1252
+ transform(value: unknown, dataType: DocumentLitsLabelConfigInterfaceValueType | InputDataTypes | undefined | InputPipeTypes, pipeConfig?: FormColumnInputs['pipe'] | undefined): string | number | null | undefined;
1253
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormatDataPipe, never>;
1254
+ static ɵpipe: _angular_core.ɵɵPipeDeclaration<FormatDataPipe, "formatData", true>;
1255
+ }
245
1256
 
246
- type ImportRowStatus = 'pending' | 'processing' | 'valid' | 'invalid' | 'error';
247
- interface ImportRowState {
248
- rowIndex: number;
249
- originalData: Record<string, any>;
250
- status: ImportRowStatus;
251
- /** Flat formControlName-keyed values after the tower has settled */
252
- settledValue?: Record<string, any>;
253
- isValid?: boolean;
254
- /** inputId array of Angular validator error keys */
255
- validationErrors?: Record<string, string[]>;
256
- /** formControlName → error keys concatenated with '.' (e.g. `"required.minlength"`) */
257
- colErrors?: Record<string, string>;
258
- errorMessage?: string;
1257
+ /**
1258
+ * @public
1259
+ * @deprecated Reachable for one minor cycle only as part of the Phase 1 public-surface
1260
+ * lockdown. Target removal: v3.0.0. No replacement — this is the empty
1261
+ * `ng generate library` stub and will be deleted in Phase 2.
1262
+ */
1263
+ declare class NgxTFormsService {
1264
+ constructor();
1265
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxTFormsService, never>;
1266
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<NgxTFormsService>;
259
1267
  }
260
- interface ImportProgress {
261
- total: number;
262
- pending: number;
263
- processing: number;
264
- complete: number;
265
- valid: number;
266
- invalid: number;
267
- error: number;
268
- rows: ImportRowState[];
1268
+
1269
+ /**
1270
+ * @public
1271
+ * @deprecated Reachable for one minor cycle only as part of the Phase 1 public-surface
1272
+ * lockdown. Target removal: v3.0.0. No replacement — this is the empty
1273
+ * `ng generate library` stub and will be deleted in Phase 2.
1274
+ */
1275
+ declare class NgxTFormsComponent {
1276
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxTFormsComponent, never>;
1277
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxTFormsComponent, "lib-ngx-t-forms", never, {}, {}, never, never, true, never>;
269
1278
  }
1279
+
1280
+ /**
1281
+ * Public entry-point for bulk imports.
1282
+ *
1283
+ * Typical usage:
1284
+ * ```ts
1285
+ * const importController = inject(TFormImportController);
1286
+ * importController.progress$.subscribe(p => render(p)); // optional reactive UI
1287
+ * const results = await importController.runImport(form, rows);
1288
+ * const validRows = results.filter(r => r.isValid);
1289
+ * ```
1290
+ *
1291
+ * Singleton (`providedIn: 'root'`) because all import sessions share the same
1292
+ * caches/injector wiring. Call {@link TFormImportController.reset} between
1293
+ * runs only if you want to force consumers of `progress$` to see an empty
1294
+ * baseline; `runImport` already clears caches on entry and exit.
1295
+ *
1296
+ * @public
1297
+ * @deprecated Reachable for one minor cycle only as part of the Phase 1 public-surface
1298
+ * lockdown. Target removal: v3.0.0. Consumers should switch to wiring an import flow
1299
+ * through the `withImportTower()` feature; the controller will move under that
1300
+ * feature tree in Phase 2.
1301
+ */
270
1302
  declare class TFormImportController {
271
1303
  private readonly _injector;
272
1304
  private readonly _rows$;
@@ -279,6 +1311,15 @@ declare class TFormImportController {
279
1311
  */
280
1312
  private _getCache;
281
1313
  private _postCache;
1314
+ /**
1315
+ * Registry of pre-processors keyed by ElementType.
1316
+ * Add an entry here to handle a new input type in _preProcessRow — no other
1317
+ * changes needed. Each processor receives the column definition and the raw
1318
+ * row and must return `{ value?, errors[] }`.
1319
+ * `value` is written to processedRow[formControlName] when defined;
1320
+ * `errors` accumulates in colErrors[formControlName].
1321
+ */
1322
+ private readonly _inputPreProcessors;
282
1323
  /**
283
1324
  * Shared financial-cycles observable for the current import session.
284
1325
  * loadSystemInputs calls getFinacialCycles() directly via NGX_T_FORMS_CONFIG
@@ -312,7 +1353,7 @@ declare class TFormImportController {
312
1353
  * @param form The form definition every row is validated against.
313
1354
  * @param rows Raw data objects — one per import row.
314
1355
  */
315
- runImport(form: FormInterface, rows: Record<string, any>[]): Promise<ImportRowState[]>;
1356
+ runImport(form: FormInterface, rows: Record<string, unknown>[]): Promise<ImportRowState[]>;
316
1357
  /** Clears all row state. */
317
1358
  reset(): void;
318
1359
  /**
@@ -341,604 +1382,641 @@ declare class TFormImportController {
341
1382
  * identical requests are deduplicated.
342
1383
  */
343
1384
  private _cachedPost;
1385
+ /**
1386
+ * End-to-end pipeline for a single import row. Runs concurrently with every
1387
+ * other row in the session.
1388
+ *
1389
+ * Steps (any thrown error short-circuits to `status: 'error'`):
1390
+ * 1. Mark the row `processing`.
1391
+ * 2. Spin up an isolated tower via {@link TFormImportController._createTower}.
1392
+ * 3. `initialize(form, { skipInitialFunctions: true })` — see the flag's
1393
+ * docs; this avoids the timing race between the tower's initial async
1394
+ * work and our synchronous `initializeFormValues`.
1395
+ * 4. `_preProcessRow` resolves nested formats (SCOA codes, multi-select
1396
+ * strings, MultipleInput sub-rows) into the shape `initializeFormValues`
1397
+ * expects.
1398
+ * 5. Apply the resolved row → tower's changeMonitor cycle fires dependent
1399
+ * functions → busy=true.
1400
+ * 6. `waitUntilSettled()` blocks until every async op drains.
1401
+ * 7. `markAllAsTouched()` so required-field validators surface even on
1402
+ * untouched controls.
1403
+ * 8. {@link TFormImportController._recomputeAllValidationErrors} re-runs
1404
+ * sync validators across the whole tree (matches what
1405
+ * `getInputErrorMessage` reports in the interactive UI).
1406
+ * 9. Collect settled values + per-input + per-column errors and update the
1407
+ * row's state.
1408
+ *
1409
+ * `finally` always destroys the tower so child injectors / valueChanges
1410
+ * subscriptions don't leak across rows.
1411
+ */
344
1412
  private _processRow;
1413
+ /**
1414
+ * Dispatches each column that has a registered pre-processor, collects
1415
+ * resolved values and errors, then returns the enriched row.
1416
+ *
1417
+ * To support a new input type add an entry to `_inputPreProcessors` —
1418
+ * nothing else needs to change here.
1419
+ */
1420
+ private _preProcessRow;
1421
+ /**
1422
+ * Pre-processor for MscoaSelection inputs.
1423
+ *
1424
+ * Resolves flat account codes into full IScoaAccount objects.
1425
+ * Column naming convention expected in the raw row:
1426
+ * {formControlName}.{basisKey}.{SEGMENT}.debit e.g. "glAccount.accrual.FUND.debit"
1427
+ * {formControlName}.{basisKey}.{SEGMENT}.credit e.g. "glAccount.cash.COSTING.credit"
1428
+ *
1429
+ * Returns the nested structure that `initializeFormValues` / the mscoa
1430
+ * component store expect:
1431
+ * { accrual: { FUND: { debit: IScoaAccount, credit: IScoaAccount } }, cash: { ... } }
1432
+ */
1433
+ private _processMscoaInput;
1434
+ /**
1435
+ * Pre-processor for MultipleInput inputs.
1436
+ *
1437
+ * Expects `row[input.formControlName]` to be an array of objects where each
1438
+ * object's keys are the formControlNames declared in `input.formInputs`.
1439
+ *
1440
+ * For each item the full tower lifecycle is run against a one-slide mock form
1441
+ * (the same sequence as _processRow on the main form), so Angular validators,
1442
+ * async validators, API calls, and calculated fields all fire and settle before
1443
+ * errors are collected. Pre-processors (e.g. MscoaSelection) are applied first
1444
+ * so resolved objects are in place when the tower initializes.
1445
+ *
1446
+ * Errors are prefixed with the item index: "[0].subField.errorCode".
1447
+ */
1448
+ private _processMultipleFormInput;
1449
+ /**
1450
+ * Rewrites a MultipleInput sub-input's cross-field dependency references from
1451
+ * the live form's COMPOUND id scheme back to the SIMPLE id the per-row mock
1452
+ * form uses.
1453
+ *
1454
+ * In the real form, {@link allFormInputs} flattens a MultipleInput's children
1455
+ * and rewrites each child's id to `${multipleInputId}.${childId}`. Every
1456
+ * dependent field's `mapTo.inputId` (value/options-API `minimumInputRequired`)
1457
+ * is authored against that compound id — so `readDep(compoundId)` resolves and
1458
+ * the dependent fetch fires. The mock form built in
1459
+ * {@link TFormImportController._processMultipleFormInput} hoists those children
1460
+ * to top-level columns, so they keep their SIMPLE ids; the baked-in compound
1461
+ * `mapTo.inputId` references then resolve to nothing, `validateMinInput` fails,
1462
+ * the value-API `params` stay `undefined`, and the resource never fetches —
1463
+ * leaving every derived sub-field null (and dropped by `getFormValueNames`).
1464
+ *
1465
+ * Deep-clones `node` (never mutates the shared form definition) and strips the
1466
+ * `${parentId}.` prefix from any `inputId` that targets a sibling in THIS
1467
+ * MultipleInput, so the sub-tower's signal graph resolves dependencies exactly
1468
+ * as the live form does.
1469
+ *
1470
+ * @param node - The sub-input config (or any nested fragment) to rewrite.
1471
+ * @param parentId - The owning MultipleInput's id (the compound prefix).
1472
+ */
1473
+ private _localizeSubInputDeps;
1474
+ /**
1475
+ * Parses a string MultipleInput cell into an array of row objects.
1476
+ *
1477
+ * Spreadsheet cells are primitives, so a MultipleInput column arrives as a
1478
+ * JSON-stringified array. Returns the parsed array on success; returns the
1479
+ * raw value unchanged on failure (empty string, plain text, malformed JSON,
1480
+ * or a non-array JSON value) so the caller's `Array.isArray` check treats it
1481
+ * as "no rows" rather than throwing.
1482
+ */
1483
+ private _tryParseJsonArray;
1484
+ /**
1485
+ * Resolves a single account code to an IScoaAccount.
1486
+ * Routed through `_cachedGet` so identical codes across concurrent rows share
1487
+ * one in-flight Observable (shareReplay) — the same mechanism used for all
1488
+ * other HTTP calls in this class.
1489
+ */
1490
+ private _lookupScoaAccount;
1491
+ /**
1492
+ * Pre-processor for `Select` and `PaginatedSelectionTable` inputs.
1493
+ *
1494
+ * Single-select inputs pass through unchanged.
1495
+ *
1496
+ * Multi-select inputs accept the value in any of:
1497
+ * - `string[]` — taken as-is, each entry trimmed.
1498
+ * - `'["a","b"]'` — JSON-stringified array.
1499
+ * - `'a, b, c'` — comma-separated string.
1500
+ * - `'[a, b]'` (malformed JSON) — fallback: strip brackets, split, strip quotes.
1501
+ *
1502
+ * If the input declares custom (in-config) options, every parsed value is
1503
+ * checked against the option set. Any mismatches are returned as errors of
1504
+ * the form `'invalidOption:<value>'` and `value` is omitted (so the parent
1505
+ * form control keeps its original/empty state and the row is flagged
1506
+ * invalid). API-fetched options are NOT validated here — see the comments
1507
+ * in {@link FormTowerControllerService.initialize} on why deferring those
1508
+ * lookups is safe in import mode.
1509
+ */
1510
+ private _processSelectInput;
1511
+ /**
1512
+ * Re-runs sync validation across the WHOLE form tree against the settled values.
1513
+ *
1514
+ * **Why this is still required after the signal-forms migration (Phase 1.5 finding;
1515
+ * kept until Phase 3):** it is NOT a settle-timing workaround — Phase 1 already made
1516
+ * `waitUntilSettled` deterministic. It compensates for two reactive-forms semantics
1517
+ * the signal-graph engine does not change:
1518
+ *
1519
+ * 1. **Cross-field validators.** Custom validators (commonFormOperations
1520
+ * `createCustomValidator`) read OTHER fields via `getFormValue()`. Angular only
1521
+ * re-runs a control's validators when ITS OWN value changes, and the engine's
1522
+ * projection effect likewise only `setValue`s controls whose value actually
1523
+ * changed — so a control whose value is unchanged keeps STALE cross-field errors
1524
+ * until a whole-tree `updateValueAndValidity` forces re-evaluation.
1525
+ * 2. **Disabled controls.** Angular never validates disabled controls (formGenerator
1526
+ * disables them from `input.disabled`); import temporarily enables the tree,
1527
+ * validates, then restores the disabled flags.
1528
+ *
1529
+ * Phase 3 (`@angular/forms/signals` `validate()`/`validateAsync()`) makes validation
1530
+ * reactive over observed fields and disabled-aware — at which point this method, its
1531
+ * enable/disable dance, and this call site can be deleted.
1532
+ */
1533
+ private _recomputeAllValidationErrors;
345
1534
  /**
346
1535
  * Walks `{ [sectionId]: FormGroup { [inputId]: FormControl } }` and
347
- * collects every control that carries validation errors.
1536
+ * collects every control that has validation errors (from `control.errors`).
348
1537
  */
349
1538
  private _collectValidationErrors;
350
1539
  /**
351
- * Builds a formControlName-keyed error map from the settled form.
352
- * Multiple error keys on one control are joined with '.'.
1540
+ * Groups the flat overridable-error list from {@link partitionFormErrors} into
1541
+ * an `inputId messages[]` map for {@link ImportRowState.overridableErrors}.
353
1542
  */
354
- private _collectColErrors;
355
- private _patchRow;
356
- private _toProgress;
357
- static ɵfac: i0.ɵɵFactoryDeclaration<TFormImportController, never>;
358
- static ɵprov: i0.ɵɵInjectableDeclaration<TFormImportController>;
359
- }
360
-
361
- declare const FORM_ACTIONS_TOKEN: InjectionToken<IFormActions>;
362
- declare const FORM_CONFIG_TOKEN: InjectionToken<FormInterface>;
363
- declare const FORM_SLIDES_TOKEN: InjectionToken<FormSlideInterface>;
364
- declare const UTILS_OBJECT_TOKEN: InjectionToken<InClassFormUtilsInterface>;
365
- declare const FORM_INPUTS_TOKEN: InjectionToken<IWorkflowDocumentPicker & IBasicFormInput & IFileUploadInput & IDateRangePickerInput & ITextareaProperties & IToggleInput & IMatrixInput & IMultiple>;
366
- declare const MULTIPLE_FORM_INPUT_TOKEN: InjectionToken<IMultiple>;
367
- declare const MSCOA_TREE_PROVIDER: InjectionToken<() => Observable<IGetTreeResponse>>;
368
- declare const NGX_T_FORMS_CONFIG_TOKEN: InjectionToken<NgxTFormsConfig>;
369
-
370
- declare class DialogTemplateComponent {
371
- readonly dialogRef: MatDialogRef<any, any>;
372
- readonly data: DialogConfig;
373
- proceed(): void;
374
- static ɵfac: i0.ɵɵFactoryDeclaration<DialogTemplateComponent, never>;
375
- static ɵcmp: i0.ɵɵComponentDeclaration<DialogTemplateComponent, "lib-dialog-template", never, {}, {}, never, never, true, never>;
376
- }
377
-
378
- declare class FormBuilderComponent implements OnDestroy, OnInit {
379
- subscription$: Subscription;
380
- private store;
381
- private route;
382
- selectLoadingForm: i0.Signal<boolean>;
383
- selectFormBuilderIsBusy: i0.Signal<boolean>;
384
- selectFormUpdated: i0.Signal<string | Date | null>;
385
- canSaveForm: i0.Signal<boolean>;
386
- isNewForm: i0.Signal<boolean>;
387
- set formId(value: string);
388
- selectHasFormId: i0.Signal<boolean>;
389
- hasMissingConfigs: i0.Signal<boolean>;
390
- elementEditorOpen: i0.Signal<boolean | null>;
391
- constructor();
392
- readonly NGX_T_FORMS_CONFIG: ngx_t_forms_types.NgxTFormsConfig;
393
- readonly closeButton: ngx_t_forms_types.ActionButton;
394
- ngOnInit(): void;
395
- ngOnDestroy(): void;
396
- saveForm: () => void;
397
- _title: string;
398
- set titleValue(value: string);
399
- initiatedTitle: boolean;
400
- get titleValue(): string | undefined;
401
- static ɵfac: i0.ɵɵFactoryDeclaration<FormBuilderComponent, never>;
402
- static ɵcmp: i0.ɵɵComponentDeclaration<FormBuilderComponent, "app-form-builder", never, { "formId": { "alias": "formId"; "required": false; }; }, {}, never, never, true, never>;
403
- }
404
-
405
- declare class FormsStoreService extends ComponentStore<IFormsInitStateInterface> {
406
- httpClient: HttpClient;
407
- snackBar: MatSnackBar;
408
- sectionPlaceholder: Record<string, AbstractControl>;
409
- readonly NGX_T_FORMS_CONFIG: NgxTFormsConfig;
410
- constructor();
411
- utils: InClassFormUtilsInterface;
412
- showMessage(message: string, type: HintType): void;
413
- private setupDevTools;
414
- get resourceFunctions(): IStoreFunctions | null;
415
- readonly selectors: FormsStoreSelectorsInterface;
416
- readonly formBuilderSelectors: {
417
- selectFormSlides$: Observable<ngx_t_forms_types.FormSlideInterface[]>;
418
- missingConfig$: Observable<string[]>;
419
- canSaveForm$: Observable<boolean>;
420
- isNewForm$: Observable<boolean>;
421
- hasMissingConfigs$: Observable<boolean>;
422
- formErrors$: Observable<{
423
- key: string;
424
- message: string;
425
- }[]>;
426
- formValidationErrorsMessages$: Observable<string[]>;
427
- inputInEdit$: Observable<ngx_t_forms_types.FormColumnInputs | undefined>;
428
- defaultInputInEdit$: Observable<any>;
429
- inputInEditValidationErrors$: Observable<ngx_t_forms_types.ValidationError[]>;
430
- selectFormTitle$: Observable<string | undefined>;
431
- getAllFormInputs$: Observable<never[] | ngx_t_forms_types.FormColumnInputs[]>;
432
- inputElementEditorConfigs$: Observable<{
433
- editorSections: {
434
- elements: {
435
- editType: ngx_t_forms_types.ElementEditorTypes;
436
- id: string;
437
- name: ngx_t_forms_types.FormInputKeys | ngx_t_forms_types.SpecialElementKeys | ngx_t_forms_types.AllFormInputPrimaryKeys;
438
- hint?: string;
439
- deepBind: Array<string>;
440
- defaultValue?: any;
441
- limitTo?: number;
442
- additionalTest?: ngx_t_forms_types.ConfigurationValidTestInterface[];
443
- disabled?: ngx_t_forms_types.ConfigurationValidTestInterface[];
444
- fetchOptions?: string[];
445
- secondaryElementEditorConfig?: Array<ngx_t_forms_types.ElementEditorConfigSectionInterface>;
446
- clearOnChange?: string[][];
447
- blurHandle?: ngx_t_forms_types.BlurHandleTypes;
448
- label: string;
449
- required?: boolean;
450
- readonly?: boolean;
451
- templateOptions?: Array<any>;
452
- placeholder?: string;
453
- options?: Array<{
454
- label: string;
455
- value: any;
456
- }>;
457
- computedErrors?: ngx_t_forms_types.ValidationError[];
458
- min?: number;
459
- max?: number;
460
- step?: number;
461
- format?: (value: any) => number;
462
- postmanCollectionConfig?: ngx_t_forms_types.IPostmanCollectionConfig;
463
- httpGetDataFunction?: (url: string, options: any) => Observable<any>;
464
- getWorkflowOptions?: Observable<ngx_t_forms_types.IWorkflowOption[]> | undefined;
465
- getMscoaTree?: Observable<ngx_t_forms_types.IGetTreeResponse> | undefined;
466
- multipleSelection?: boolean;
467
- }[];
468
- hasErrors: boolean;
469
- label: string;
470
- showItemValue?: keyof ngx_t_forms_types.FormColumnInputs;
471
- id: string;
472
- additionalTest?: ngx_t_forms_types.ConfigurationValidTestInterface[];
473
- }[];
474
- title?: string;
475
- description?: string;
476
- }>;
477
- selectFormSlideSections$: Observable<{
478
- inputConfigErrors: {
479
- key: string;
480
- message: string;
481
- }[];
482
- sectionId: string;
483
- label: string;
484
- columns: Array<ngx_t_forms_types.FormColumnInputs>;
485
- inEdit?: boolean;
486
- sectionIsSeen?: boolean;
487
- isActive?: boolean;
488
- }[]>;
489
- };
490
- readonly actions: {
491
- loadFormListSuccess: (observableOrValue: {
492
- forms: ngx_t_forms_types.DatabaseFormInterface[];
493
- } | Observable<{
494
- forms: ngx_t_forms_types.DatabaseFormInterface[];
495
- }>) => rxjs.Subscription;
496
- toggleFormBuilderBusy: () => void;
497
- toggleLoadingForm: () => void;
498
- toggleLoadingForms: (observableOrValue: {
499
- loadingForms: boolean;
500
- } | Observable<{
501
- loadingForms: boolean;
502
- }>) => rxjs.Subscription;
503
- loadFormSuccess: (observableOrValue: {
504
- form: ngx_t_forms_types.DatabaseFormInterface;
505
- } | Observable<{
506
- form: ngx_t_forms_types.DatabaseFormInterface;
507
- }>) => rxjs.Subscription;
508
- toggleFormBusy: (observableOrValue: {
509
- formId: string;
510
- } | Observable<{
511
- formId: string;
512
- }>) => rxjs.Subscription;
513
- archivedSuccess: (observableOrValue: {
514
- formId: string;
515
- } | Observable<{
516
- formId: string;
517
- }>) => rxjs.Subscription;
518
- setFormId: (observableOrValue: {
519
- formId: string;
520
- } | Observable<{
521
- formId: string;
522
- }>) => rxjs.Subscription;
523
- setError: (observableOrValue: {
524
- error: string | undefined;
525
- type: ngx_t_forms_types.FormStateErrors;
526
- } | Observable<{
527
- error: string | undefined;
528
- type: ngx_t_forms_types.FormStateErrors;
529
- }>) => rxjs.Subscription;
530
- handleListSectionChange: (observableOrValue: {
531
- listSection: FormListSection;
532
- } | Observable<{
533
- listSection: FormListSection;
534
- }>) => rxjs.Subscription;
535
- handleRouterStateChange: (observableOrValue: {
536
- routerState: _angular_router.ActivatedRouteSnapshot | null;
537
- } | Observable<{
538
- routerState: _angular_router.ActivatedRouteSnapshot | null;
539
- }>) => rxjs.Subscription;
540
- handleSetSubmittingForm: (observableOrValue: {
541
- submittingForm: boolean;
542
- } | Observable<{
543
- submittingForm: boolean;
544
- }>) => rxjs.Subscription;
545
- setFormInitialValues: (observableOrValue: {
546
- initialFormValues: Record<string, any>;
547
- } | Observable<{
548
- initialFormValues: Record<string, any>;
549
- }>) => rxjs.Subscription;
550
- handleEditorUpdateFormInEdit: (observableOrValue: {
551
- form: FormInterface;
552
- } | Observable<{
553
- form: FormInterface;
554
- }>) => rxjs.Subscription;
555
- updateFormInputConfigFromTower: (observableOrValue: {
556
- inputId: string;
557
- config: ngx_t_forms_types.FormColumnInputs;
558
- } | Observable<{
559
- inputId: string;
560
- config: ngx_t_forms_types.FormColumnInputs;
561
- }>) => rxjs.Subscription;
562
- setInputInEditId: (observableOrValue: {
563
- inputInEdit: string | null;
564
- } | Observable<{
565
- inputInEdit: string | null;
566
- }>) => rxjs.Subscription;
567
- };
568
- readonly actionsFormBuilder: {
569
- handelSaveForm: () => void;
570
- setFormTitle: (title: string) => void;
571
- handleSectionDragDrop: (event: _angular_cdk_drag_drop.CdkDragDrop<any, any, any>) => void;
572
- handleInputDragDrop: (event: _angular_cdk_drag_drop.CdkDragDrop<any, any, any>, sectionId: string) => void;
573
- handleAddSection: () => void;
574
- stepTitleChangeStep: (sectionId: string, title: string) => void;
575
- formDeleteInput: (item: ngx_t_forms_types.FormColumnInputs) => void;
576
- multipleInputToggleLabel: (item: ngx_t_forms_types.FormColumnInputs) => void;
577
- editInput: (item: ngx_t_forms_types.FormColumnInputs) => void;
578
- addMultipleInputValueCalculationFunction: (item: ngx_t_forms_types.IMultipleInputCal, multipleInputId: string | undefined) => void;
579
- formDeleteSection: (sectionId: string) => void;
580
- formDeleteSectionInputs: (sectionId: string) => void;
581
- moveInputToSection: (inputId: string, targetSectionId: string) => void;
582
- reorderMultipleInputItems: (event: _angular_cdk_drag_drop.CdkDragDrop<ngx_t_forms_types.FormColumnInputs[], any, any>, multipleInputId: string) => void;
583
- cloneCopyFormInput: (inputId: string) => void;
584
- saveInput: (sectionId: string) => void;
585
- applyFormTemplate: (form: FormInterface) => void;
586
- selectInputTemplate: (inputId: string, element: ngx_t_forms_types.ElementTypes) => void;
587
- formInputChange: (ele: ngx_t_forms_types.ElementEditorInnerSectionElementInterface, value: any) => void;
588
- saveSubmitApi: (dataPlaceholder: undefined | {
589
- data: ngx_t_forms_types.APIDataFetchingConfigurationInterface;
590
- }, keyInEdit: "submissionAPI" | "canSubmitAPI" | undefined) => void;
591
- removeSubmissionApi: (api: ngx_t_forms_types.APIDataFetchingConfigurationInterface, keyInEdit: "submissionAPI" | "canSubmitAPI" | undefined) => void;
592
- elementConfigurationChanged: (inputId: string, value: any, ele: ngx_t_forms_types.ElementEditorInnerSectionElementInterface) => void;
593
- elementBlur: (inputId: string, event: any, element: ngx_t_forms_types.ElementEditorInnerSectionElementInterface) => void;
594
- addMultipleFormInput: (sectionId: string, multipleInputInEditId: string) => void;
595
- clearInputInEdit: (inputId: string) => void;
596
- addInputToScoaSelection: (sectionId: string, scoaInputId: string) => void;
597
- };
598
- readonly effects: {
599
- createForm$: (observableOrValue: FormInterface | Observable<FormInterface>) => rxjs.Subscription;
600
- loadForms$: (observableOrValue?: void | Observable<void> | undefined) => rxjs.Subscription;
601
- loadForm$: (observableOrValue: string | Observable<string>) => rxjs.Subscription;
602
- updateForm$: (observableOrValue: {
603
- form: FormInterface;
604
- versionNumber: number;
605
- } | Observable<{
606
- form: FormInterface;
607
- versionNumber: number;
608
- }>) => rxjs.Subscription;
609
- archiveForm$: (observableOrValue: string | Observable<string>) => rxjs.Subscription;
610
- setListSection$: (observableOrValue: FormListSection | Observable<FormListSection>) => rxjs.Subscription;
611
- unArchiveForm$: (observableOrValue: string | Observable<string>) => rxjs.Subscription;
612
- deleteForm$: (observableOrValue: string | Observable<string>) => rxjs.Subscription;
613
- };
614
- refreshExternalFormStates?: (form: FormInterface) => void;
615
- registerFormChangeFn(fn: (form: FormInterface) => void): void;
616
- createFormPlaceHolderFormGroups(form: FormInterface): void;
617
- static ɵfac: i0.ɵɵFactoryDeclaration<FormsStoreService, never>;
618
- static ɵprov: i0.ɵɵInjectableDeclaration<FormsStoreService>;
619
- }
620
-
621
- declare class FormsComponent implements OnInit, OnDestroy {
622
- private route;
623
- private store;
624
- private document;
625
- subscription$: Subscription;
626
- selectFormsList$: Observable<LocalFormStateSelectorInterface[]>;
627
- selectGroupedForms$: Observable<Record<string, any[]>>;
628
- private searchQuerySubject;
629
- searchQuery$: Observable<string>;
630
- selectHasActiveSearch$: Observable<boolean>;
631
- selectFilteredGroupedForms$: Observable<Record<string, any[]>>;
632
- selectLoadingForms$: Observable<boolean>;
633
- selectErrors$: Observable<any>;
634
- selectFormListSection$: Observable<FormListSection>;
635
- NGX_T_FORMS_CONFIG: ngx_t_forms_types.NgxTFormsConfig;
636
- closeButton: ngx_t_forms_types.ActionButton;
637
- constructor(route: ActivatedRoute, store: FormsStoreService, document: Document);
638
- ngOnDestroy(): void;
639
- get formListSections(): {
640
- value: FormListSection;
641
- label: string;
642
- }[];
643
- viewportWidth: number;
644
- ngOnInit(): void;
645
- labels: {
646
- label: string;
647
- formControlName: string;
648
- }[];
649
- activeForm: string | null;
650
- getCols(): 1 | 2 | 3 | 4;
651
- getFormAvatar(formTitle: string): string;
652
- archive(form: LocalFormStateSelectorInterface, event: Event): Promise<void>;
653
- unarchive(form: LocalFormStateSelectorInterface, event: Event): Promise<void>;
654
- delete(form: LocalFormStateSelectorInterface, event: Event): Promise<void>;
655
- loadForms(): void;
656
- router: Router;
657
- activatedRoute: ActivatedRoute;
658
- setSection(value: FormListSection): void;
659
- editForm(form: LocalFormStateSelectorInterface): void;
660
- addNewForm(): void;
661
- clearSearch(): void;
662
- get searchQuery(): string;
663
- set searchQuery(v: string);
664
- static ɵfac: i0.ɵɵFactoryDeclaration<FormsComponent, never>;
665
- static ɵcmp: i0.ɵɵComponentDeclaration<FormsComponent, "app-forms", never, {}, {}, never, never, true, never>;
1543
+ private _groupOverridableByInput;
1544
+ /**
1545
+ * Builds a formControlName-keyed error map from the settled form.
1546
+ * Multiple error keys on one control are joined with '.'.
1547
+ */
1548
+ private _collectColErrors;
1549
+ /**
1550
+ * Collects the MultipleInput columns whose value is tower-derived — i.e. they
1551
+ * carry a value-API fetch (`matOptions.fetch.value.source === 'api'`) or a
1552
+ * value-producing calculation. These are the columns whose import rows are
1553
+ * overridden by the tower's own value graph and therefore need the
1554
+ * tower-favored deep merge applied in {@link TFormImportController._processRow}.
1555
+ */
1556
+ private _valueDerivedMultipleInputs;
1557
+ /** True iff the column derives its value from a value-API fetch or a calculation. */
1558
+ private _isValueDerivedColumn;
1559
+ /**
1560
+ * Deep-merges two values with the **override** (tower-derived) value favored
1561
+ * and the **base** (import) value filling every gap it leaves.
1562
+ *
1563
+ * Rules (mirrors the import-merge contract):
1564
+ * - `override` wins for scalars and for any key it defines.
1565
+ * - Keys present only on `base` are preserved (import fills gaps).
1566
+ * - Arrays merge **element-wise by index** (each element deep-merged), so a
1567
+ * tower row that omits an import-only field keeps that field.
1568
+ * - An **empty** `override` array (or `null`/`undefined`) falls back entirely
1569
+ * to `base` — a tower value that resolves empty never erases the import rows.
1570
+ */
1571
+ private _deepMergePreferTower;
1572
+ /**
1573
+ * Immutable row update clones the rows array and the targeted row before
1574
+ * pushing through `_rows$` so subscribers downstream of `progress$` always
1575
+ * receive a fresh reference (cheap change detection in components).
1576
+ */
1577
+ private _patchRow;
1578
+ /**
1579
+ * Compute the {@link ImportProgress} aggregate from the row array. Pure
1580
+ * driven by `progress$` and `currentProgress`.
1581
+ */
1582
+ private _toProgress;
1583
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TFormImportController, never>;
1584
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<TFormImportController>;
666
1585
  }
667
1586
 
668
- declare class ValidationExpressioCreatorComponent implements OnDestroy, OnInit {
669
- hint: string;
670
- label: string;
671
- formInputs: FormColumnInputs[];
672
- _data: any;
673
- set data(value: any);
674
- get data(): any;
675
- set expression(value: string);
676
- _valueAccessRules: Record<string, TreeNode[]>;
677
- set valueAccessRules(value: Record<string, TreeNode[]>);
678
- get valueAccessRules(): Record<string, TreeNode[]>;
679
- subscription$: Subscription;
680
- ngOnDestroy(): void;
681
- expressionChange: EventEmitter<{
682
- expression: string | null;
683
- valueAccessRules: Record<string, TreeNode[]>;
684
- }>;
685
- ngOnInit(): void;
686
- textareaElementRef: ElementRef;
687
- expressionControl: FormControl<string | null>;
688
- cursorPosition: number;
689
- showSuggestions: boolean;
690
- optionsSearch: string;
691
- onTextChange(expression: string): Promise<void>;
692
- cleanValueAccessRules(): void;
693
- selectSuggestionInput(suggestion: string): void;
694
- get getAllInputs(): FormColumnInputs[];
695
- onFocus(event: FocusEvent): void;
696
- methods: {
697
- label: string;
698
- hint: string;
699
- value: string;
700
- }[];
701
- getMethods(): {
702
- label: string;
703
- hint: string;
704
- value: string;
705
- }[];
706
- variableInEdit: string | null;
707
- get errorMessage(): string | null;
708
- get valueAccessOptions(): string[];
709
- activeVariableChanged(value: TreeNode[] | string): void;
710
- static ɵfac: i0.ɵɵFactoryDeclaration<ValidationExpressioCreatorComponent, never>;
711
- static ɵcmp: i0.ɵɵComponentDeclaration<ValidationExpressioCreatorComponent, "lib-validation-expressio-creator", never, { "hint": { "alias": "hint"; "required": false; }; "label": { "alias": "label"; "required": false; }; "formInputs": { "alias": "formInputs"; "required": false; }; "data": { "alias": "data"; "required": false; }; "expression": { "alias": "expression"; "required": false; }; "valueAccessRules": { "alias": "valueAccessRules"; "required": false; }; }, { "expressionChange": "expressionChange"; }, never, never, true, never>;
712
- }
1587
+ /**
1588
+ * Provides a unique identifier for each tower instance created during an
1589
+ * import run — one id per imported row. The form import controller uses this
1590
+ * to disambiguate concurrent tower contexts when materialising rows into
1591
+ * form submissions.
1592
+ *
1593
+ * @see provideNgxTForms
1594
+ *
1595
+ * @public
1596
+ * @deprecated Internal token used by `TFormImportController`. Will be relocated
1597
+ * under the `withImportTower()` feature tree in Phase 2; the token (or its
1598
+ * renamed/improved successor) will remain callable. See DECISIONS.md D-014.
1599
+ */
1600
+ declare const IMPORT_TOWER_INSTANCE_ID: InjectionToken<string>;
713
1601
 
714
- declare function testAgainstItem(test: ConfigurationValidTestInterface, item: any): boolean;
1602
+ /**
1603
+ * Generates a hierarchical form with nested FormGroups based on section IDs.
1604
+ * Parent form listens to all descendant changes, with validation cascading upward.
1605
+ *
1606
+ * @param inputs Array of form inputs with their configurations
1607
+ * @param getFormValue Record of form values used for custom validation
1608
+ * @returns A FormGroup with nested FormGroups for each section
1609
+ *
1610
+ * @public
1611
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
1612
+ * barrel; remains functional. A renamed/improved replacement may be introduced
1613
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
1614
+ */
1615
+ declare function formGenerator(inputs: Array<FormColumnInputs>, getFormValue: () => Record<string, any>): FormGroup;
715
1616
 
716
- interface IConfigElementError {
717
- key: string;
718
- message: string;
719
- }
720
- declare class TDynamicDataEditComponent implements OnDestroy {
721
- private ngZone;
722
- private editorInitiated;
723
- constructor(ngZone: NgZone);
724
- ngOnDestroy(): void;
725
- private valueChanges;
726
- private subscription;
727
- elementEditorTypes: typeof ElementEditorTypes;
728
- private _editorConfig;
729
- private _data;
730
- set editorConfig(config: ElementEditorInnerSectionElementInterface | undefined);
731
- _formInputs$: BehaviorSubject<FormColumnInputs[]>;
732
- _formInputs: FormColumnInputs[];
733
- set formInputs(inputs: Array<FormColumnInputs>);
734
- get formInputs(): Array<FormColumnInputs>;
735
- set data(data: any);
736
- get data(): any;
737
- validationErrors: IConfigElementError[] | null;
738
- valueChange: EventEmitter<unknown>;
739
- blur: EventEmitter<any>;
740
- editorConfigValue$: Observable<ElementEditorInnerSectionElementInterface | undefined>;
741
- dataValue$: Observable<any>;
742
- get getMscoaTree$(): Observable<IGetTreeResponse | undefined>;
743
- get getWorkflowOptions$(): Observable<IWorkflowOption[] | undefined>;
744
- get value$(): Observable<any>;
745
- get dataOptions$(): Observable<any>;
746
- get disabled$(): Observable<boolean | undefined>;
747
- private initializeValueChanges;
748
- private computeValueChange;
749
- inputChange(event: any): void;
750
- valueChanged(value: unknown): void;
751
- manualValueChange(event: {
752
- value: unknown;
753
- deepBind: Array<string>;
754
- }): void;
755
- blurOff: boolean;
756
- elementBlur(event: any): void;
757
- get inputHasBlurFunction$(): Observable<BlurHandleTypes | undefined>;
758
- blurFunctionTooltip(blurHandle: BlurHandleTypes | undefined): "Enable/disable pre-populating of the form control name from the label" | "Enable/disable auto conversion of control name to camel case" | "Toggle blur function";
759
- formatLabel: (value: number) => any;
760
- vm$: Observable<{
761
- editorConfigValue: ElementEditorInnerSectionElementInterface | undefined;
762
- value: any;
763
- dataOptions: any;
764
- disabled: boolean | undefined;
765
- inputHasBlurFunction: BlurHandleTypes | undefined;
766
- dataValue: any;
767
- inputConfig: any;
768
- }>;
769
- static ɵfac: i0.ɵɵFactoryDeclaration<TDynamicDataEditComponent, never>;
770
- static ɵcmp: i0.ɵɵComponentDeclaration<TDynamicDataEditComponent, "lib-t-dynamic-data-edit", never, { "editorConfig": { "alias": "editorConfig"; "required": false; }; "formInputs": { "alias": "formInputs"; "required": false; }; "data": { "alias": "data"; "required": false; }; "validationErrors": { "alias": "validationErrors"; "required": false; }; }, { "valueChange": "valueChange"; "blur": "blur"; }, never, never, true, never>;
771
- }
1617
+ /**
1618
+ * @public
1619
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
1620
+ * barrel; remains functional. A renamed/improved replacement may be introduced
1621
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
1622
+ */
1623
+ declare function getSectionElements(elements: ElementEditorInnerSectionElementInterface[], inputInEdit: (FormColumnInputs) | undefined, NGX_T_FORMS_CONFIG: NgxTFormsConfig, utils: InClassFormUtilsInterface, errors?: ValidationError[]): ElementEditorInnerSectionElementInterface[];
772
1624
 
773
- declare class TreeComponent {
774
- activePath: TreeNode[];
775
- pathInEdit: TreeNode | null;
776
- get activeLevel(): number;
777
- private _transformer;
778
- setupPath(node: TreeNode): void;
779
- updateStateFromPath(path: TreeNode[]): void;
780
- selectNode(node: FlatNode): TreeNode[] | undefined;
781
- saveNodeInEdit(): {
782
- children: undefined;
783
- value: undefined;
784
- key: string;
785
- name: string;
786
- inEdit?: boolean;
787
- path: string[];
788
- keyIsArrayIndex?: boolean;
789
- functions: ngx_t_forms_types.IArrayFunction[];
790
- }[] | undefined;
791
- resetNode(): void;
792
- removeFunction(id: string): void;
793
- closeEdit(): void;
794
- nodeIsExpandable(node: TreeNode): boolean;
795
- showNode(node: FlatNode): boolean;
796
- hasANodeInEdit(): boolean;
797
- nodeIsChecked(node: FlatNode): boolean;
798
- treeControl: FlatTreeControl<FlatNode, FlatNode>;
799
- treeFlattener: MatTreeFlattener<TreeNode, FlatNode, FlatNode>;
800
- dataSource: MatTreeFlatDataSource<TreeNode, FlatNode, FlatNode>;
801
- private dynamicObject;
802
- constructor();
803
- computeTreeData(dynamicObject: any): void;
804
- assignDataSourceData(tree: TreeNode[]): void;
805
- hasChild: (_: number, node: FlatNode) => boolean;
806
- getValue(): any;
807
- addNewFunction(): void;
808
- functionChanged(value: string): void;
1625
+ /**
1626
+ * @public
1627
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
1628
+ * barrel; remains functional. A renamed/improved replacement may be introduced
1629
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
1630
+ */
1631
+ declare const returnMappedPathValue: (pathMap: TreeNode[], obj: unknown) => unknown;
1632
+ /**
1633
+ * @public
1634
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
1635
+ * barrel; remains functional. A renamed/improved replacement may be introduced
1636
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
1637
+ */
1638
+ declare const getValueFromValueAccessor: (valueAccessRules: FormInputBasicOptionInterface | TreeNode[] | Record<string, TreeNode[]>, data: unknown) => unknown;
1639
+
1640
+ /**
1641
+ * One entry in the polymorphic-input registry. Maps an `ElementTypes` value to
1642
+ * a lazily-loaded renderer plus the metadata the host needs to wire it.
1643
+ *
1644
+ * Each `load()` is a dynamic `import()`, so every renderer is code-split out of
1645
+ * the host bundle — a form with only text fields never downloads the editor,
1646
+ * camera, signature pad, MSCOA charts, etc. The dynamic boundary also breaks
1647
+ * the otherwise-circular import between the host and `ImageCapture`.
1648
+ */
1649
+ interface ElementEntry {
1650
+ /** Lazy loader for the concrete renderer component. */
1651
+ readonly load: () => Promise<Type<unknown>>;
1652
+ /**
1653
+ * `true` when the renderer also accepts `editorMode` and
1654
+ * `formBuilderFunctions` inputs. The host only forwards those two inputs to
1655
+ * builder-aware entries, so `NgComponentOutlet` never tries to set an input
1656
+ * the target component does not declare.
1657
+ */
1658
+ readonly builderAware?: boolean;
809
1659
  }
810
1660
 
811
- declare class TDynamicDataViewComponent {
812
- treeClass: TreeComponent;
813
- data: any;
814
- constructor();
815
- _data: any;
816
- ngOnInit(): void;
817
- ngOnChanges(changes: SimpleChanges): void;
818
- getNodeValueColor(value: any): "green" | "blue" | "purple" | "black";
819
- static ɵfac: i0.ɵɵFactoryDeclaration<TDynamicDataViewComponent, never>;
820
- static ɵcmp: i0.ɵɵComponentDeclaration<TDynamicDataViewComponent, "lib-t-dynamic-data-view", never, { "data": { "alias": "data"; "required": false; }; }, {}, never, never, true, never>;
1661
+ type TFormInputFormGroup = FormGroup<{
1662
+ [sectionId: string]: FormGroup<{
1663
+ [inputId: string]: FormControl<string | null>;
1664
+ }>;
1665
+ }> | undefined | null;
1666
+ /**
1667
+ * Polymorphic input host — given an `ITowerStepColumn` descriptor, selects
1668
+ * and renders the correct concrete input component (text, select, date,
1669
+ * file upload, signature, geo-location, MSCOA, document picker, workflow
1670
+ * adjudication, etc.) and wires it to the parent reactive `FormGroup`.
1671
+ *
1672
+ * @remarks
1673
+ * Accepts portal-style prop injection via the optional `'COMPONENT_PROPS'`
1674
+ * token so it can be rendered through `ComponentPortal` with inputs supplied
1675
+ * dynamically.
1676
+ *
1677
+ * Inputs:
1678
+ * - `inputConfig: ITowerStepColumn | undefined` — descriptor of the input
1679
+ * to render; the `element` field selects the concrete renderer.
1680
+ * - `formGroup: FormGroup<{...}> | undefined | null` — the parent reactive
1681
+ * form group keyed by section id then input id.
1682
+ * - `editorMode: boolean` — default `false`; when `true`, renders the
1683
+ * builder-side variant.
1684
+ * - `formBuilderFunctions: FormBuilderFunctions | undefined` — builder
1685
+ * hooks passed through to inputs that need them (e.g., MSCOA).
1686
+ *
1687
+ * Outputs:
1688
+ * - `valueChange: unknown` — emits the input's new value whenever the user
1689
+ * edits the bound `FormControl`. Concrete child inputs are rendered through
1690
+ * `NgComponentOutlet` (which forwards inputs only, never outputs) and write
1691
+ * their value through the shared `FormGroup` via `ControlValueAccessor`, so
1692
+ * this host bridges those control edits into a single output the tower wires
1693
+ * to `engine.updateValue(col.id, $event)`. Without this bridge user edits
1694
+ * reach the projected `FormGroup` (so submission works) but never reach the
1695
+ * engine's `#model`, leaving the signal graph blind to user input — no
1696
+ * dependent calculation, value-fetch, or options-fetch ever re-fires.
1697
+ *
1698
+ * @public
1699
+ */
1700
+ declare class TFormInputComponent {
1701
+ #private;
1702
+ /**
1703
+ * Descriptor of the input to render. `element` selects the concrete renderer.
1704
+ *
1705
+ * Modeled as a `model()` (not `input()`) so that portal-style injection via
1706
+ * `'COMPONENT_PROPS'` can write into the signal at construction time — signal
1707
+ * inputs are read-only at runtime, but model signals are writable via `.set()`.
1708
+ */
1709
+ readonly inputConfig: _angular_core.ModelSignal<ITowerStepColumn | undefined>;
1710
+ /** Parent reactive `FormGroup` keyed by section id then input id. */
1711
+ readonly formGroup: _angular_core.ModelSignal<TFormInputFormGroup>;
1712
+ /** When `true`, renders the builder-side variant. */
1713
+ readonly editorMode: _angular_core.ModelSignal<boolean>;
1714
+ /** Builder hooks passed through to inputs that need them (e.g., MSCOA). */
1715
+ readonly formBuilderFunctions: _angular_core.ModelSignal<FormBuilderFunctions | undefined>;
1716
+ /**
1717
+ * Emits the input's new value on every user-originated edit of the bound
1718
+ * control. The tower binds this to `engine.updateValue(col.id, $event)`,
1719
+ * which is the ONLY path user input takes into the engine's `#model` (and
1720
+ * therefore the signal-graph dependency reactivity). The projection effect
1721
+ * patches controls with `{ emitEvent: false }`, so signal→control writes do
1722
+ * NOT echo back here — only genuine user edits emit.
1723
+ */
1724
+ readonly valueChange: _angular_core.OutputEmitterRef<unknown>;
1725
+ protected readonly elementTypes: typeof ElementTypes;
1726
+ /**
1727
+ * Polymorphic-host control flag — true when the bound `FormGroup` already
1728
+ * has a `FormControl` (or, for `DateRangePicker`, both start/end controls)
1729
+ * matching the descriptor's `id`.
1730
+ */
1731
+ protected readonly hasFormControlInstance: _angular_core.Signal<boolean>;
1732
+ /**
1733
+ * Registry entry for the current descriptor's element type. Resolves to the
1734
+ * basic-input fallback for unknown types, mirroring the former `@default`
1735
+ * switch branch. `undefined` only while no descriptor is bound.
1736
+ */
1737
+ protected readonly elementEntry: _angular_core.Signal<ElementEntry | undefined>;
1738
+ /**
1739
+ * Lazily-loaded renderer component for the current element type, unwrapped in
1740
+ * the template via the `async` pipe. The promise is re-created only when the
1741
+ * resolved entry changes, so editing other descriptor fields does not reload
1742
+ * the component.
1743
+ */
1744
+ protected readonly elementComponent: _angular_core.Signal<Promise<Type<unknown>> | null>;
1745
+ /**
1746
+ * Inputs forwarded to the resolved renderer. Builder-aware renderers also
1747
+ * receive `editorMode` and `formBuilderFunctions`; every other renderer gets
1748
+ * only `inputConfig` and `formGroup`, so `NgComponentOutlet` never sets an
1749
+ * input the target component does not declare.
1750
+ */
1751
+ protected readonly elementInputs: _angular_core.Signal<Record<string, unknown>>;
1752
+ constructor(props: Record<string, unknown> | null);
1753
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TFormInputComponent, [{ optional: true; }]>;
1754
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TFormInputComponent, "lib-t-form-input", never, { "inputConfig": { "alias": "inputConfig"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "editorMode": { "alias": "editorMode"; "required": false; "isSignal": true; }; "formBuilderFunctions": { "alias": "formBuilderFunctions"; "required": false; "isSignal": true; }; }, { "inputConfig": "inputConfigChange"; "formGroup": "formGroupChange"; "editorMode": "editorModeChange"; "formBuilderFunctions": "formBuilderFunctionsChange"; "valueChange": "valueChange"; }, never, never, true, never>;
821
1755
  }
822
1756
 
1757
+ /**
1758
+ * Renders an MSCOA (Municipal Standard Chart of Accounts) form input — a
1759
+ * segmented reactive form field that lets the user pick an account by
1760
+ * walking the MSCOA tree. Surfaces validation status via
1761
+ * `TFormInputStatusComponent`.
1762
+ *
1763
+ * Inputs:
1764
+ * - `inputConfig: ITowerStepColumn` — required, descriptor for this MSCOA input.
1765
+ * - `editorMode: boolean` — default `false`; when `true`, renders in
1766
+ * builder-editor mode rather than user-facing mode.
1767
+ * - `formGroup: FormGroup` — required, the parent reactive form group that
1768
+ * owns this input's controls.
1769
+ * - `formBuilderFunctions: FormBuilderFunctions | undefined` — optional
1770
+ * builder hooks supplied when used inside the form builder.
1771
+ *
1772
+ * Outputs:
1773
+ * - `reload: void` — fires when the input requests its
1774
+ * container reload the underlying data (e.g., after a tree refresh).
1775
+ */
823
1776
  declare class MscoaFormInputComponent {
824
- inputConfig: ITowerStepColumn;
825
- editorMode: boolean;
826
- formGroup: FormGroup;
827
- formBuilderFunctions: FormBuilderFunctions | undefined;
828
- reload: EventEmitter<void>;
829
- get errorMessage(): string | string[] | undefined;
830
- static ɵfac: i0.ɵɵFactoryDeclaration<MscoaFormInputComponent, never>;
831
- static ɵcmp: i0.ɵɵComponentDeclaration<MscoaFormInputComponent, "lib-mscoa-form-input", never, { "inputConfig": { "alias": "inputConfig"; "required": false; }; "editorMode": { "alias": "editorMode"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "formBuilderFunctions": { "alias": "formBuilderFunctions"; "required": false; }; }, { "reload": "reload"; }, never, never, true, never>;
1777
+ /** Descriptor for this MSCOA input. */
1778
+ readonly inputConfig: _angular_core.InputSignal<ITowerStepColumn>;
1779
+ /** When `true`, renders in builder-editor mode rather than user-facing mode. */
1780
+ readonly editorMode: _angular_core.InputSignal<boolean>;
1781
+ /** Parent reactive form group that owns this input's controls. */
1782
+ readonly formGroup: _angular_core.InputSignal<FormGroup<any>>;
1783
+ /** Optional builder hooks supplied when used inside the form builder. */
1784
+ readonly formBuilderFunctions: _angular_core.InputSignal<FormBuilderFunctions | undefined>;
1785
+ /** Fires when the input requests its container reload the underlying data. */
1786
+ readonly reload: _angular_core.OutputEmitterRef<void>;
1787
+ protected get errorMessage(): string | string[] | undefined;
1788
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MscoaFormInputComponent, never>;
1789
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MscoaFormInputComponent, "lib-mscoa-form-input", never, { "inputConfig": { "alias": "inputConfig"; "required": true; "isSignal": true; }; "editorMode": { "alias": "editorMode"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": true; "isSignal": true; }; "formBuilderFunctions": { "alias": "formBuilderFunctions"; "required": false; "isSignal": true; }; }, { "reload": "reload"; }, never, never, true, never>;
832
1790
  }
833
1791
 
834
- interface EncryptedData {
835
- ciphertext: string;
836
- salt: string;
837
- iv: string;
838
- hmac: string;
1792
+ /**
1793
+ * Form input that captures a hand-drawn signature via `SignaturePadInputComponent`
1794
+ * and writes the resulting image to the bound `FormGroup` control. Surfaces
1795
+ * validation state through `TFormInputStatusComponent`.
1796
+ *
1797
+ * Inputs:
1798
+ * - `inputConfig: ITowerStepColumn` — required, descriptor for this input.
1799
+ * - `formGroup: FormGroup` — required, the parent reactive form group.
1800
+ *
1801
+ * Outputs:
1802
+ * - `reload: void` — fires when the input requests its container reload
1803
+ * (e.g., after clearing the pad).
1804
+ *
1805
+ * @public
1806
+ */
1807
+ declare class SignatureInputElementComponent {
1808
+ readonly inputConfig: _angular_core.InputSignal<ITowerStepColumn>;
1809
+ readonly formGroup: _angular_core.InputSignal<FormGroup<any>>;
1810
+ readonly reload: _angular_core.OutputEmitterRef<void>;
1811
+ protected readonly errorMessage: _angular_core.Signal<string | string[] | undefined>;
1812
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SignatureInputElementComponent, never>;
1813
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SignatureInputElementComponent, "lib-signature-input-element", never, { "inputConfig": { "alias": "inputConfig"; "required": true; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": true; "isSignal": true; }; }, { "reload": "reload"; }, never, never, true, never>;
839
1814
  }
840
1815
 
841
- declare const getSignatureImage: (inputConfig: FormColumnInputs, value: EncryptedData | undefined) => Promise<string | undefined>;
1816
+ /**
1817
+ * @file Round-trip bridge between the guided condition builder in
1818
+ * `lib-validators-config` and a custom validator's `expression` **string** plus
1819
+ * its `inputsObservedForChanges` dependency list — both part of the frozen
1820
+ * {@link FormControlCustomValidatorsInterface} contract.
1821
+ *
1822
+ * The validator engine evaluates `expression` with the shared predicate DSL
1823
+ * ({@link evaluatePredicate}) where **`true` means the field is INVALID**. The
1824
+ * scope it evaluates against is `{ [variable]: <whole value of inputId> }` for
1825
+ * every entry in `inputsObservedForChanges` (see `build-manual-validation.ts`).
1826
+ *
1827
+ * Because the grammar is identical to the array-access predicate builder, this
1828
+ * module reuses {@link PREDICATE_OPERATORS} so the operator labels stay in lock
1829
+ * step with `lib-data-tree`. The model differs in one validator-specific way:
1830
+ * the right-hand side of a comparison may be **another field** (e.g. an
1831
+ * "end date is before start date" rule), not only a typed literal — so the
1832
+ * serializer must emit a bare variable token rather than a quoted string in
1833
+ * that case.
1834
+ *
1835
+ * {@link parseConditions} best-effort parses an expression into the structured
1836
+ * model; when it cannot (parentheses, mixed `&&`/`||`, unary `!`, an unknown
1837
+ * operator), it returns `null` and the UI falls back to the raw editor — power
1838
+ * users and legacy expressions are never locked out.
1839
+ *
1840
+ * @internal
1841
+ */
842
1842
 
843
- declare class SignatureInputElementComponent {
844
- inputConfig: ITowerStepColumn;
845
- formGroup: FormGroup;
846
- reload: EventEmitter<void>;
847
- get errorMessage(): string | string[] | undefined;
848
- static ɵfac: i0.ɵɵFactoryDeclaration<SignatureInputElementComponent, never>;
849
- static ɵcmp: i0.ɵɵComponentDeclaration<SignatureInputElementComponent, "lib-signature-input-element", never, { "inputConfig": { "alias": "inputConfig"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; }, { "reload": "reload"; }, never, never, true, never>;
1843
+ /** A single guided comparison: `field operator (value | field)`. */
1844
+ interface ValidatorCondition {
1845
+ /** Left operand — always a referenced field's variable name. */
1846
+ field: string;
1847
+ /** One of the {@link PREDICATE_OPERATORS} values (`===`, `>`, `includes`, …). */
1848
+ operator: string;
1849
+ /** Whether the right operand is a typed literal or another field. */
1850
+ compareTo: 'value' | 'field';
1851
+ /** Literal text, or the variable name of the compared field. */
1852
+ value: string;
850
1853
  }
851
-
852
- declare class TFormInputComponent {
853
- private props;
854
- inputConfig: ITowerStepColumn | undefined;
855
- formGroup: FormGroup<{
856
- [sectionId: string]: FormGroup<{
857
- [inputId: string]: FormControl<string | null>;
858
- }>;
859
- }> | undefined | null;
860
- editorMode: boolean;
861
- formBuilderFunctions: FormBuilderFunctions | undefined;
862
- optionsSearchWordKeyWord: string;
863
- elementTypes: typeof ElementTypes;
864
- constructor(props: any);
865
- get hasFormControlInstance(): boolean;
866
- static ɵfac: i0.ɵɵFactoryDeclaration<TFormInputComponent, [{ optional: true; }]>;
867
- static ɵcmp: i0.ɵɵComponentDeclaration<TFormInputComponent, "lib-t-form-input", never, { "inputConfig": { "alias": "inputConfig"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "editorMode": { "alias": "editorMode"; "required": false; }; "formBuilderFunctions": { "alias": "formBuilderFunctions"; "required": false; }; }, {}, never, never, true, never>;
1854
+ /** A flat list of conditions joined by a single connector. */
1855
+ interface ValidatorConditionGroup {
1856
+ connector: '&&' | '||';
1857
+ conditions: ValidatorCondition[];
868
1858
  }
869
1859
 
870
- declare class TourManagerService {
871
- private readonly tourService;
872
- userProfile: this;
873
- constructor();
874
- startTourByOption(steps: IStepOption[]): {
875
- stepShow$: rxjs.Subject<ngx_ui_tour_core.StepChangeParams<IStepOption>>;
876
- stepHide$: rxjs.Subject<ngx_ui_tour_core.StepChangeParams<IStepOption>>;
877
- initialize$: rxjs.Subject<IStepOption[]>;
878
- start$: rxjs.Subject<void>;
879
- end$: rxjs.Subject<void>;
880
- pause$: rxjs.Subject<void>;
881
- resume$: rxjs.Subject<void>;
882
- };
883
- static ɵfac: i0.ɵɵFactoryDeclaration<TourManagerService, never>;
884
- static ɵprov: i0.ɵɵInjectableDeclaration<TourManagerService>;
1860
+ /** A field the guided builder can reference, with a friendly label. */
1861
+ interface ExpressionFieldOption {
1862
+ readonly variable: string;
1863
+ readonly label: string;
1864
+ /** The step the field belongs to, used to group the dropdown (`null` = ungrouped). */
1865
+ readonly stepName: string | null;
885
1866
  }
886
-
887
- declare class UserFormStepperComponent extends FormTowerControllerService {
1867
+ /** A set of field options sharing a step, rendered as one `<optgroup>`. */
1868
+ interface ExpressionFieldGroup {
1869
+ /** The `<optgroup>` label, or `null` to render the options without a group. */
1870
+ readonly label: string | null;
1871
+ readonly options: readonly ExpressionFieldOption[];
1872
+ }
1873
+ /**
1874
+ * Builder-side editor for authoring a boolean expression (used for guarded
1875
+ * navigation, conditional validation, and API path-selection rules). Validates
1876
+ * the expression's syntax in real time and exposes the typed tree of value-
1877
+ * access references the expression depends on.
1878
+ *
1879
+ * Inputs:
1880
+ * - `hint: string` — helper text shown beneath the expression field.
1881
+ * - `label: string` — label for the expression field (default
1882
+ * `'Validation Expression'`).
1883
+ * - `formInputs: FormColumnInputs[]` — inputs the expression may reference.
1884
+ * - `data: unknown` — sample data used to test the expression.
1885
+ * - `expression: string` — initial expression string written into the editor
1886
+ * control.
1887
+ * - `valueAccessRules: Record<string, TreeNode[]>` — current value-access
1888
+ * tree for variables referenced by the expression.
1889
+ *
1890
+ * Outputs:
1891
+ * - `expressionChange` — fires when either the expression text or its derived
1892
+ * value-access tree changes.
1893
+ *
1894
+ * @public
1895
+ * @deprecated Internal builder UI re-exported via the `_deprecated/` compatibility
1896
+ * barrel; remains functional. A renamed/improved replacement may be introduced
1897
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
1898
+ */
1899
+ declare class ValidationExpressioCreatorComponent {
1900
+ #private;
1901
+ /** Helper text shown beneath the expression field. */
1902
+ readonly hint: _angular_core.InputSignal<string>;
1903
+ /** Label for the expression field. */
1904
+ readonly label: _angular_core.InputSignal<string>;
1905
+ /** Inputs the expression may reference. */
1906
+ readonly formInputs: _angular_core.InputSignal<FormColumnInputs[]>;
1907
+ /** Sample data used to test the expression. Heterogeneous shape from parent template binding. */
1908
+ readonly data: _angular_core.InputSignal<any>;
1909
+ /** Initial expression string written into the editor control. */
1910
+ readonly expression: _angular_core.InputSignal<string>;
1911
+ /** Current value-access tree for variables referenced by the expression. */
1912
+ readonly valueAccessRules: _angular_core.InputSignal<Record<string, TreeNode[]>>;
1913
+ /** Fires when either the expression text or its derived value-access tree changes. */
1914
+ readonly expressionChange: _angular_core.OutputEmitterRef<{
1915
+ expression: string | null;
1916
+ valueAccessRules: Record<string, TreeNode[]>;
1917
+ }>;
1918
+ protected readonly textareaElementRef: _angular_core.Signal<ElementRef<HTMLTextAreaElement> | undefined>;
1919
+ protected readonly expressionControl: FormControl<string | null>;
1920
+ protected readonly showSuggestions: _angular_core.WritableSignal<boolean>;
1921
+ protected readonly optionsSearch: _angular_core.WritableSignal<string | undefined>;
1922
+ protected readonly variableInEdit: _angular_core.WritableSignal<string | null>;
1923
+ /** Operator choices, shared with the validators builder for label parity. */
1924
+ protected readonly operators: readonly {
1925
+ value: string;
1926
+ label: string;
1927
+ }[];
1928
+ protected readonly mode: _angular_core.Signal<"guided" | "advanced">;
1929
+ protected readonly group: _angular_core.Signal<ValidatorConditionGroup>;
1930
+ protected readonly expressionText: _angular_core.Signal<string>;
1931
+ /** Fields the guided builder can reference, as friendly options. */
1932
+ protected readonly fieldOptions: _angular_core.Signal<readonly ExpressionFieldOption[]>;
888
1933
  /**
889
- * Handles the key down event and opens the application log if the key combination is pressed.
890
- * @param event The keyboard event object.
1934
+ * Field options grouped by their `stepName` for the dropdowns, preserving
1935
+ * first-seen order. Fields without a step collapse into a single ungrouped
1936
+ * bucket (rendered without an `<optgroup>`), so forms that don't carry step
1937
+ * names degrade to a plain flat list.
891
1938
  */
892
- onKeyDown(event: KeyboardEvent): void;
893
- _formId: string | undefined;
894
- set formId(value: string | undefined);
895
- loading: boolean;
896
- loadForm(formId: string | undefined): void;
897
- _initialFormValuesLocal: any;
898
- set initialValues(initialFormValues: any);
899
- set globalSystemInputs(inputs: FormColumnInputs[]);
900
- passParamsOnSubmit: any;
901
- get formBuilderFunctions(): FormBuilderFunctions;
902
- stepper: MatStepper | undefined;
903
- isEditable: boolean;
904
- getStepState(step: any, index: number): StepState;
905
- getPreviousStepLabel(): string | undefined;
906
- getNextStepLabel(): string | undefined;
907
- canProceedToNextStep(step: any): boolean;
908
- get getSubmissionStatus(): string;
909
- handleSubmit(): void;
910
- tourManagerService: TourManagerService;
911
- get hasTour(): boolean;
1939
+ protected readonly fieldOptionGroups: _angular_core.Signal<readonly ExpressionFieldGroup[]>;
1940
+ /** Whether the current expression can be represented by the guided builder. */
1941
+ protected readonly canUseGuided: _angular_core.Signal<boolean>;
1942
+ protected readonly methods: {
1943
+ label: string;
1944
+ hint: string;
1945
+ value: string;
1946
+ }[];
912
1947
  /**
913
- * Initiates and configures a dynamic, multi-step tutorial tour for the form.
914
- * The tour guides the user through the form's title, sections, and individual fields.
1948
+ * Bridge the `expression` input into the FormControl and seed the guided
1949
+ * builder. Reparsing is `untracked` so this only re-runs when the `expression`
1950
+ * input changes — never when the user edits inside either mode.
915
1951
  */
916
- startTour(): void;
917
- refreshASection(sectionId: string): void;
918
- static ɵfac: i0.ɵɵFactoryDeclaration<UserFormStepperComponent, never>;
919
- static ɵcmp: i0.ɵɵComponentDeclaration<UserFormStepperComponent, "lib-user-form-stepper", never, { "formId": { "alias": "formId"; "required": false; }; "initialValues": { "alias": "initialValues"; "required": false; }; "globalSystemInputs": { "alias": "globalSystemInputs"; "required": false; }; "passParamsOnSubmit": { "alias": "passParamsOnSubmit"; "required": false; }; }, {}, never, never, true, never>;
920
- }
921
-
922
- declare class FormatDataPipe implements PipeTransform {
923
- transform(value: any, dataType: DocumentLitsLabelConfigInterfaceValueType | InputDataTypes | undefined | InputPipeTypes, pipeConfig?: FormColumnInputs['pipe'] | undefined): any;
924
- static ɵfac: i0.ɵɵFactoryDeclaration<FormatDataPipe, never>;
925
- static ɵpipe: i0.ɵɵPipeDeclaration<FormatDataPipe, "formatData", true>;
1952
+ protected readonly expressionBridge: _angular_core.EffectRef;
1953
+ /** Mirror the `valueAccessRules` input into the local mutable copy. */
1954
+ protected readonly valueAccessRulesBridge: _angular_core.EffectRef;
1955
+ protected readonly valueAccessOptions: _angular_core.Signal<string[]>;
1956
+ protected readonly allInputs: _angular_core.Signal<FormColumnInputs[]>;
1957
+ constructor();
1958
+ protected getMethods(): {
1959
+ label: string;
1960
+ hint: string;
1961
+ value: string;
1962
+ }[];
1963
+ protected get errorMessage(): string | null;
1964
+ protected getValueAccessRule(key: string): TreeNode[];
1965
+ protected onTextChange(expression: string): Promise<void>;
1966
+ protected cleanValueAccessRules(): void;
1967
+ protected selectSuggestionInput(suggestion: string): void;
1968
+ protected onFocus(): void;
1969
+ /** Read the value-event target as a string. */
1970
+ protected inputValue(event: Event): string;
1971
+ /** Switch the All/Any connector joining the conditions. */
1972
+ protected setConnector(connector: '&&' | '||'): void;
1973
+ /** Append a fresh condition defaulting its field to the first available one. */
1974
+ protected addCondition(): void;
1975
+ /** Apply a partial change to the condition at `index`. */
1976
+ protected updateCondition(index: number, patch: Partial<ValidatorCondition>): void;
1977
+ /** Flip a condition between comparing to a typed value and another field. */
1978
+ protected toggleCompareTo(index: number): void;
1979
+ /** Remove the condition at `index`. */
1980
+ protected removeCondition(index: number): void;
1981
+ /** Switch to the raw expression editor (the escape hatch for power users). */
1982
+ protected useAdvanced(): void;
1983
+ /** Switch back to the guided builder, reparsing the current expression. */
1984
+ protected useGuided(): void;
1985
+ protected toggleVariableInEdit(variable: string): void;
1986
+ protected activeVariableChanged(value: TreeNode[] | string | {
1987
+ [key: string]: TreeNode[] | string;
1988
+ }): void;
1989
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ValidationExpressioCreatorComponent, never>;
1990
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ValidationExpressioCreatorComponent, "lib-validation-expressio-creator", never, { "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "formInputs": { "alias": "formInputs"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "expression": { "alias": "expression"; "required": false; "isSignal": true; }; "valueAccessRules": { "alias": "valueAccessRules"; "required": false; "isSignal": true; }; }, { "expressionChange": "expressionChange"; }, never, never, true, never>;
926
1991
  }
927
1992
 
928
- declare function assignDeepPropertyToObject(item: any, path: Array<string>, value: any): any;
929
-
930
1993
  /**
931
- * Creates a file upload data object from a Base64 string.
1994
+ * Generic Material dialog shell used by the forms runtime to surface
1995
+ * confirmation prompts and short-lived informational dialogs. Reads its
1996
+ * configuration (title, body, button labels) from `MAT_DIALOG_DATA` as a
1997
+ * `DialogConfig` and resolves its `MatDialogRef` with `true` when the user
1998
+ * proceeds.
932
1999
  *
933
- * @param fileName The desired name for the file (e.g., 'my-image.png').
934
- * @param contentType The MIME type of the file (e.g., 'image/png').
935
- * @param base64Content The raw Base64 encoded content of the file.
936
- * @returns A populated FileUploadInputValueInterface object.
2000
+ * Inputs:
2001
+ * - _None._ Configuration arrives through `MAT_DIALOG_DATA` (`DialogConfig`).
2002
+ *
2003
+ * Outputs:
2004
+ * - _None._ Result is delivered via `MatDialogRef.close(true)`.
2005
+ *
2006
+ * @public
2007
+ * @deprecated Internal Material dialog template re-exported via the `_deprecated/`
2008
+ * compatibility barrel; remains functional. A renamed/improved replacement may be
2009
+ * introduced in a future minor; the original symbol stays callable. See
2010
+ * DECISIONS.md D-014.
937
2011
  */
938
- declare const createFileFromBase64: (fileName: string, contentType: string, base64Content: string) => FileUploadInputValueInterface;
2012
+ declare class DialogTemplateComponent {
2013
+ readonly dialogRef: MatDialogRef<any, any>;
2014
+ readonly data: DialogConfig;
2015
+ proceed(): void;
2016
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogTemplateComponent, never>;
2017
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DialogTemplateComponent, "lib-dialog-template", never, {}, {}, never, never, true, never>;
2018
+ }
939
2019
 
940
- type DeepPropertyValue = any;
941
- type PropertyPath = (string | number | IArrayFunction[])[];
942
2020
  /**
943
2021
  * Custom error class for property access errors in deep object traversal.
944
2022
  *
@@ -962,6 +2040,11 @@ type PropertyPath = (string | number | IArrayFunction[])[];
962
2040
  * console.log(`Error message: ${error.message}`);
963
2041
  * }
964
2042
  * }
2043
+ *
2044
+ * @public
2045
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
2046
+ * barrel; remains functional. A renamed/improved replacement may be introduced
2047
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
965
2048
  */
966
2049
  declare class PropertyAccessError extends Error {
967
2050
  path: PropertyPath;
@@ -973,12 +2056,12 @@ declare class PropertyAccessError extends Error {
973
2056
  *
974
2057
  * @function returnDeepProperty
975
2058
  *
976
- * @param {any} item - The object to traverse.
2059
+ * @param {unknown} item - The object to traverse.
977
2060
  * @param {(string|number|symbol)[]} path - An array representing the path to the desired property.
978
2061
  * Each element in the array can be a string (for object properties),
979
2062
  * a number (for array indices), or a symbol.
980
2063
  *
981
- * @returns {any} The value of the deep property if it exists, otherwise undefined.
2064
+ * @returns {DeepPropertyValue} The value of the deep property if it exists, otherwise undefined.
982
2065
  *
983
2066
  * @throws {Error} If the input item is null or undefined, or if the path is not a non-empty array.
984
2067
  *
@@ -1016,19 +2099,24 @@ declare class PropertyAccessError extends Error {
1016
2099
  * - Throws an error if the input item is null/undefined or if the path is invalid
1017
2100
  *
1018
2101
  * @see safeReturnDeepProperty for a version that never throws and returns an object with value and error properties
2102
+ *
2103
+ * @public
2104
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
2105
+ * barrel; remains functional. A renamed/improved replacement may be introduced
2106
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
1019
2107
  */
1020
- declare const returnDeepProperty: (item: any, path: PropertyPath) => DeepPropertyValue;
2108
+ declare const returnDeepProperty: (item: unknown, path: PropertyPath) => DeepPropertyValue;
1021
2109
  /**
1022
2110
  * Safely retrieves a deeply nested property from an object using a path array.
1023
2111
  *
1024
2112
  * @function safeReturnDeepProperty
1025
2113
  *
1026
- * @param {any} item - The object to traverse.
2114
+ * @param {unknown} item - The object to traverse.
1027
2115
  * @param {(string|number|symbol)[]} path - An array representing the path to the desired property.
1028
2116
  * Each element in the array can be a string (for object properties),
1029
2117
  * a number (for array indices), or a symbol.
1030
2118
  *
1031
- * @returns {{value: any, error: string|null}} An object containing:
2119
+ * @returns {{value: DeepPropertyValue, error: string|null}} An object containing:
1032
2120
  * - value: The value of the deep property if found, otherwise undefined.
1033
2121
  * - error: A string describing the error if one occurred, otherwise null.
1034
2122
  *
@@ -1068,12 +2156,40 @@ declare const returnDeepProperty: (item: any, path: PropertyPath) => DeepPropert
1068
2156
  * - Implement error handling in a functional programming style
1069
2157
  *
1070
2158
  * @see returnDeepProperty for the core implementation that this function wraps
2159
+ *
2160
+ * @public
2161
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
2162
+ * barrel; remains functional. A renamed/improved replacement may be introduced
2163
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
1071
2164
  */
1072
- declare const safeReturnDeepProperty: (item: any, path: PropertyPath) => {
2165
+ declare const safeReturnDeepProperty: (item: unknown, path: PropertyPath) => {
1073
2166
  value: DeepPropertyValue;
1074
2167
  error: string | null;
1075
2168
  };
1076
2169
 
2170
+ /**
2171
+ * @public
2172
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
2173
+ * barrel; remains functional. A renamed/improved replacement may be introduced
2174
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
2175
+ */
2176
+ declare function assignDeepPropertyToObject(item: any, path: Array<string>, value: any): any;
2177
+
2178
+ /**
2179
+ * Creates a file upload data object from a Base64 string.
2180
+ *
2181
+ * @param fileName The desired name for the file (e.g., 'my-image.png').
2182
+ * @param contentType The MIME type of the file (e.g., 'image/png').
2183
+ * @param base64Content The raw Base64 encoded content of the file.
2184
+ * @returns A populated FileUploadInputValueInterface object.
2185
+ *
2186
+ * @public
2187
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
2188
+ * barrel; remains functional. A renamed/improved replacement may be introduced
2189
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
2190
+ */
2191
+ declare const createFileFromBase64: (fileName: string, contentType: string, base64Content: string) => FileUploadInputValueInterface;
2192
+
1077
2193
  /**
1078
2194
  * Creates a sample value for a given form input configuration.
1079
2195
  * It determines the value based on the input's element type, specific input type (e.g., email, number),
@@ -1081,13 +2197,46 @@ declare const safeReturnDeepProperty: (item: any, path: PropertyPath) => {
1081
2197
  *
1082
2198
  * @param {FormColumnInputs} input - The configuration object for the form input.
1083
2199
  * @returns {any} A sample value appropriate for the input type.
2200
+ *
2201
+ * @public
2202
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
2203
+ * barrel; remains functional. A renamed/improved replacement may be introduced
2204
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
1084
2205
  */
1085
2206
  declare function getSampleValueForInput(input: FormColumnInputs): any;
1086
2207
 
2208
+ /**
2209
+ * @public
2210
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
2211
+ * barrel; remains functional. A renamed/improved replacement may be introduced
2212
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
2213
+ */
1087
2214
  declare function getPipedValueFromDataType(dataType: InputDataTypes | undefined | DocumentLitsLabelConfigInterfaceValueType, value: any, pipe: FormColumnInputs['pipe'] | undefined): any;
1088
2215
 
2216
+ /**
2217
+ * @public
2218
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
2219
+ * barrel; remains functional. A renamed/improved replacement may be introduced
2220
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
2221
+ */
2222
+ declare const initFormConfigToV2: (formConfig: FormInterfaceMigration) => FormInterface;
2223
+
2224
+ /**
2225
+ * @public
2226
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
2227
+ * barrel; remains functional. A renamed/improved replacement may be introduced
2228
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
2229
+ */
1089
2230
  declare function getUrl(url: string, variables: NgxTFormsConfig): string;
1090
2231
 
2232
+ /**
2233
+ * @public
2234
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
2235
+ * barrel; remains functional. A renamed/improved replacement may be introduced
2236
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
2237
+ */
2238
+ declare const sheetConsolodation: (allSheets: Record<string, Record<string, any>[]>) => Record<string, any>[];
2239
+
1091
2240
  /**
1092
2241
  * Validates an object against a validation expression.
1093
2242
  *
@@ -1095,13 +2244,52 @@ declare function getUrl(url: string, variables: NgxTFormsConfig): string;
1095
2244
  * @param {object} object - The object to validate.
1096
2245
  * @returns {boolean} - A boolean indicating whether the object is valid according to the expression.
1097
2246
  *
1098
- * This function is designed to handle a variety of cases for validating objects based on a given expression. It can:
1099
- * 1. Evaluate an expression part with a single comparison operator, for example: 'a === 1' or '(a === 1)'.
1100
- * 2. Evaluate an expression with multiple comparison operators, including: '===', '==', '!==', '!=', '>', '<', '>=', and '<='.
1101
- * 3. Group expression parts considering bracket enclosures and logical operators.
1102
- * 4. Evaluate an expression with multiple logical operators, such as 'a === 1 && b === 2 || c === 3'.
2247
+ * Backed by the shared predicate evaluator ({@link evaluatePredicate}), a
2248
+ * paren-aware, backward-compatible superset of the original space-split DSL. It
2249
+ * supports `===`/`==`/`!==`/`!=`/`>`/`<`/`>=`/`<=`, `&&`/`||` with correct
2250
+ * precedence and grouping, unary `!`, deep-path operands, multi-word quoted
2251
+ * strings, the keyword operators `includes`/`in`/`startsWith`/`endsWith`/`matches`,
2252
+ * and bare-operand truthiness.
2253
+ */
2254
+ /**
2255
+ * Public callers pass either a plain object (e.g. `{ age: 1 }`) or an array
2256
+ * value (`item as T[]` from {@link evaluateArrayAccessRules}). Both are valid
2257
+ * index containers for the DSL (arrays support `length`, numeric indices, and
2258
+ * the `in` operator on string keys), so accept `object` and narrow internally.
2259
+ */
2260
+ type ValidationTarget = object;
2261
+ /**
2262
+ * Validates an object against a predicate expression. Delegates to the shared,
2263
+ * paren-aware predicate evaluator (a backward-compatible superset of the
2264
+ * original space-split DSL). Throws on a structurally invalid expression.
2265
+ */
2266
+ declare const validateObjectAgainstString: (expression: string, object: ValidationTarget) => boolean;
2267
+ /**
2268
+ * @public
2269
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
2270
+ * barrel; remains functional. A renamed/improved replacement may be introduced
2271
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
1103
2272
  */
1104
- declare const validateObjectAgainstString: (expression: string, object: any) => boolean;
1105
2273
  declare function validateExpressionSyntax(expression: string): string | null;
1106
2274
 
1107
- export { DialogTemplateComponent, FORM_ACTIONS_TOKEN, FORM_CONFIG_TOKEN, FORM_INPUTS_TOKEN, FORM_SLIDES_TOKEN, FormBuilderComponent, FormTowerControllerService, FormatDataPipe, FormsComponent, MSCOA_TREE_PROVIDER, MULTIPLE_FORM_INPUT_TOKEN, MscoaFormInputComponent, NGX_T_FORMS_CONFIG_TOKEN, NgxTFormsComponent, NgxTFormsService, PropertyAccessError, SignatureInputElementComponent, TDynamicDataEditComponent, TDynamicDataViewComponent, TFormImportController, TFormInputComponent, UTILS_OBJECT_TOKEN, UserFormStepperComponent, ValidationExpressioCreatorComponent, assignDeepPropertyToObject, createFileFromBase64, formGenerator, getPipedValueFromDataType, getSampleValueForInput, getSectionElements, getSignatureImage, getUrl, getValueFromValueAccessor, initFormConfigToV2, provideNgxTForms, returnDeepProperty, returnMappedPathValue, safeReturnDeepProperty, testAgainstItem, textIconsForUserHints, validateExpressionSyntax, validateObjectAgainstString };
2275
+ /**
2276
+ * @public
2277
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
2278
+ * barrel; remains functional. A renamed/improved replacement may be introduced
2279
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
2280
+ */
2281
+ declare function testAgainstItem(test: ConfigurationValidTestInterface, item: unknown): boolean;
2282
+
2283
+ /**
2284
+ * @public
2285
+ * @deprecated Internal helper re-exported via the `_deprecated/` compatibility
2286
+ * barrel; remains functional. A renamed/improved replacement may be introduced
2287
+ * in a future minor; the original symbol stays callable. See DECISIONS.md D-014.
2288
+ *
2289
+ * **Breaking (v2.x):** now requires `secret` as a third argument — the
2290
+ * hardcoded library secret was removed (LIB-05). Read it from
2291
+ * `INPUT_SECRET_TOKEN` in your component / service before calling.
2292
+ */
2293
+ declare const getSignatureImage: (inputConfig: FormColumnInputs, value: EncryptedData | undefined, secret: string) => Promise<string | undefined>;
2294
+
2295
+ export { DialogTemplateComponent, FORM_ACTIONS_TOKEN, FORM_CONFIG_TOKEN, FORM_INPUTS_TOKEN, FORM_ROUTE_SOURCE, FORM_SLIDES_TOKEN, FormBuilderComponent, FormTowerControllerService, FormatDataPipe, FormsComponent, HttpPipelineRepository, IMPORT_TOWER_INSTANCE_ID, INPUT_SECRET_TOKEN, MSCOA_TREE_PROVIDER, MULTIPLE_FORM_INPUT_TOKEN, MscoaFormInputComponent, NGX_T_FORMS_CONFIG_TOKEN, NgxTFormsComponent, NgxTFormsService, PIPELINE_REPOSITORY, PipelineRepository, PropertyAccessError, SignatureInputElementComponent, TDynamicDataEditComponent, TDynamicDataViewComponent, TFormImportController, TFormInputComponent, UTILS_OBJECT_TOKEN, UserFormStepperComponent, ValidationExpressioCreatorComponent, assignDeepPropertyToObject, createFileFromBase64, formGenerator, getPipedValueFromDataType, getSampleValueForInput, getSectionElements, getSignatureImage, getUrl, getValueFromValueAccessor, initFormConfigToV2, provideNgxTForms, returnDeepProperty, returnMappedPathValue, safeReturnDeepProperty, sheetConsolodation, testAgainstItem, textIconsForUserHints, validateExpressionSyntax, validateObjectAgainstString, withHttpPipeline, withInputSecret, withRouterFormId };