ngx-t-forms 3.1.8 → 3.1.9
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.
- package/fesm2022/{ngx-t-forms-api-endpoint-config.component-B4a-L4Eq.mjs → ngx-t-forms-api-endpoint-config.component-BbS1dY0l.mjs} +10 -10
- package/fesm2022/ngx-t-forms-api-endpoint-config.component-BbS1dY0l.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DqRunUz4.mjs → ngx-t-forms-auto-complete-input-element.component-B8eluIrh.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DqRunUz4.mjs.map → ngx-t-forms-auto-complete-input-element.component-B8eluIrh.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-autofillToken-D-BYfzxR.mjs +189 -0
- package/fesm2022/ngx-t-forms-autofillToken-D-BYfzxR.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-t8bTUgZ1.mjs → ngx-t-forms-basic-input-input-element.component-SSLXyCz9.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-t8bTUgZ1.mjs.map → ngx-t-forms-basic-input-input-element.component-SSLXyCz9.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-PcjMdAKu.mjs → ngx-t-forms-calculated-field-rules.component-Cn_rxXMX.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-PcjMdAKu.mjs.map → ngx-t-forms-calculated-field-rules.component-Cn_rxXMX.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-Ca4rim_J.mjs → ngx-t-forms-chip-options-creator-editor.component-CGm5tgsp.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-Ca4rim_J.mjs.map → ngx-t-forms-chip-options-creator-editor.component-CGm5tgsp.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-clamp-probe.directive-DMUdeVrM.mjs +99 -0
- package/fesm2022/ngx-t-forms-clamp-probe.directive-DMUdeVrM.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-conditional-display-config.component-Di7p76_n.mjs → ngx-t-forms-conditional-display-config.component-DIMIWTKj.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-conditional-display-config.component-Di7p76_n.mjs.map → ngx-t-forms-conditional-display-config.component-DIMIWTKj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CXMmDwKS.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-DKb3E9gA.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CXMmDwKS.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-DKb3E9gA.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-data-source-picker.component-DioXvLi3.mjs → ngx-t-forms-data-source-picker.component-BG_sr5VH.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-data-source-picker.component-DioXvLi3.mjs.map → ngx-t-forms-data-source-picker.component-BG_sr5VH.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-h0S6qZDT.mjs → ngx-t-forms-date-picker-input-element.component-vUlUuzJ0.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-h0S6qZDT.mjs.map → ngx-t-forms-date-picker-input-element.component-vUlUuzJ0.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-8c1ErbgP.mjs → ngx-t-forms-date-range-picker-input-element.component-YVE_s-7Y.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-8c1ErbgP.mjs.map → ngx-t-forms-date-range-picker-input-element.component-YVE_s-7Y.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-time-picker-input-element.component-BgjGlXeq.mjs → ngx-t-forms-date-time-picker-input-element.component-BlOS8NdF.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-date-time-picker-input-element.component-BgjGlXeq.mjs.map → ngx-t-forms-date-time-picker-input-element.component-BlOS8NdF.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-u2UUPdAo.mjs +623 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-u2UUPdAo.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-document-picker.component-DYpsBHxT.mjs → ngx-t-forms-document-picker.component-DOYyRgh4.mjs} +41 -11
- package/fesm2022/{ngx-t-forms-document-picker.component-DYpsBHxT.mjs.map → ngx-t-forms-document-picker.component-DOYyRgh4.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-editor-input-element.component-CzNSb79n.mjs → ngx-t-forms-editor-input-element.component-BvZPNjQX.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-editor-input-element.component-CzNSb79n.mjs.map → ngx-t-forms-editor-input-element.component-BvZPNjQX.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-FPxHxAwF.mjs → ngx-t-forms-file-upload-input-element.component-CONELqoi.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-FPxHxAwF.mjs.map → ngx-t-forms-file-upload-input-element.component-CONELqoi.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-copy-lint.component-TCSe-27-.mjs +248 -0
- package/fesm2022/ngx-t-forms-form-copy-lint.component-TCSe-27-.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-form-input-selector.component-B3ES53R-.mjs → ngx-t-forms-form-input-selector.component-Bdkuzw0R.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-input-selector.component-B3ES53R-.mjs.map → ngx-t-forms-form-input-selector.component-Bdkuzw0R.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-Cu_ZEw1V.mjs → ngx-t-forms-form-json-view.component-CDcbgWgN.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-Cu_ZEw1V.mjs.map → ngx-t-forms-form-json-view.component-CDcbgWgN.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-DmTGnRgi.mjs → ngx-t-forms-form-section-stepper.component-CqLSI8zP.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-DmTGnRgi.mjs.map → ngx-t-forms-form-section-stepper.component-CqLSI8zP.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-6m2BM9e9.mjs → ngx-t-forms-forms-builder-menu.component-DFCVe_Fq.mjs} +185 -15
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-DFCVe_Fq.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-forms-native-date-adapter-CCJT5ep1.mjs → ngx-t-forms-forms-native-date-adapter-h6fClNMS.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-forms-native-date-adapter-CCJT5ep1.mjs.map → ngx-t-forms-forms-native-date-adapter-h6fClNMS.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-geo-location.component-DgXSaH0t.mjs → ngx-t-forms-geo-location.component-DA3ATrvw.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-geo-location.component-DgXSaH0t.mjs.map → ngx-t-forms-geo-location.component-DA3ATrvw.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-header-template-editor.component-NJLm6jkA.mjs → ngx-t-forms-header-template-editor.component-B9Cj8dOI.mjs} +13 -5
- package/fesm2022/ngx-t-forms-header-template-editor.component-B9Cj8dOI.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-iqPS9cPK.mjs → ngx-t-forms-image-capture-input-element.component-C9oz_ZjA.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-iqPS9cPK.mjs.map → ngx-t-forms-image-capture-input-element.component-C9oz_ZjA.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-index-CSXX8RTm.mjs +2 -0
- package/fesm2022/ngx-t-forms-index-CSXX8RTm.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-custom.component-BOy_3JqU.mjs → ngx-t-forms-input-custom.component-CqIr5wpy.mjs} +91 -25
- package/fesm2022/ngx-t-forms-input-custom.component-CqIr5wpy.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-editor.component-IUrZNmA5.mjs → ngx-t-forms-input-editor.component-DU2sgo4i.mjs} +9 -9
- package/fesm2022/{ngx-t-forms-input-editor.component-IUrZNmA5.mjs.map → ngx-t-forms-input-editor.component-DU2sgo4i.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-CtTAw9jk.mjs → ngx-t-forms-map-mat-options-keys-WfFq_0tS.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-CtTAw9jk.mjs.map → ngx-t-forms-map-mat-options-keys-WfFq_0tS.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C9bxVpQ1.mjs → ngx-t-forms-mat-chip-list-editor.component-CKnvqeix.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C9bxVpQ1.mjs.map → ngx-t-forms-mat-chip-list-editor.component-CKnvqeix.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BpiCchqY.mjs → ngx-t-forms-missing-form-configs.component-B5dDbmpj.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BpiCchqY.mjs.map → ngx-t-forms-missing-form-configs.component-B5dDbmpj.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-97tHCSyK.mjs +37 -0
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-97tHCSyK.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mscoa-config.component-soUwIbVA.mjs → ngx-t-forms-mscoa-config.component-BtLd7F2n.mjs} +10 -10
- package/fesm2022/{ngx-t-forms-mscoa-config.component-soUwIbVA.mjs.map → ngx-t-forms-mscoa-config.component-BtLd7F2n.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs → ngx-t-forms-mscoa-error-display.component-Bmt1vboD.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs.map → ngx-t-forms-mscoa-error-display.component-Bmt1vboD.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component--3DvQm1K.mjs → ngx-t-forms-mscoa-segment-config.component-DrzpixbK.mjs} +9 -9
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component--3DvQm1K.mjs.map → ngx-t-forms-mscoa-segment-config.component-DrzpixbK.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs → ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs.map → ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-ddpips7E.mjs +3592 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-ddpips7E.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-CaVyRedJ.mjs → ngx-t-forms-ngx-t-forms-C1kZpYIM.mjs} +9303 -2202
- package/fesm2022/ngx-t-forms-ngx-t-forms-C1kZpYIM.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-paginated-selection-table-B7TyhJnh.mjs +596 -0
- package/fesm2022/ngx-t-forms-paginated-selection-table-B7TyhJnh.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-payload-template-editor.component-CVj-G4MC.mjs → ngx-t-forms-payload-template-editor.component-DVL4aBuG.mjs} +13 -5
- package/fesm2022/ngx-t-forms-payload-template-editor.component-DVL4aBuG.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-BMyZKOXv.mjs → ngx-t-forms-pipeline-generator.component-DpqipW6G.mjs} +15 -15
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-BMyZKOXv.mjs.map → ngx-t-forms-pipeline-generator.component-DpqipW6G.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-quill-input.component-oUnmMDGi.mjs → ngx-t-forms-quill-input.component-x9CHGOJy.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-quill-input.component-oUnmMDGi.mjs.map → ngx-t-forms-quill-input.component-x9CHGOJy.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-record-list-manager.component-CdQU6loA.mjs → ngx-t-forms-record-list-manager.component-BGg86NER.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-record-list-manager.component-CdQU6loA.mjs.map → ngx-t-forms-record-list-manager.component-BGg86NER.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-CI9nLVXe.mjs +281 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-CI9nLVXe.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-B5w1Lvfo.mjs → ngx-t-forms-rest-api-call-setup.component-B4LzPwxg.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-B5w1Lvfo.mjs.map → ngx-t-forms-rest-api-call-setup.component-B4LzPwxg.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-section-report.component-CocLNrN5.mjs → ngx-t-forms-section-report.component-BS2CV_xl.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-section-report.component-CocLNrN5.mjs.map → ngx-t-forms-section-report.component-BS2CV_xl.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-select-input-element.component-C5qjqCXW.mjs +281 -0
- package/fesm2022/ngx-t-forms-select-input-element.component-C5qjqCXW.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-CBdC0WCz.mjs → ngx-t-forms-selection-options-editor.component-B6sYvtcj.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-CBdC0WCz.mjs.map → ngx-t-forms-selection-options-editor.component-B6sYvtcj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs → ngx-t-forms-t-workflow-picker.component-xDbl63v1.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs.map → ngx-t-forms-t-workflow-picker.component-xDbl63v1.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-GXiLEsTp.mjs → ngx-t-forms-textarea-input-element.component-ri0r0ujE.mjs} +77 -11
- package/fesm2022/ngx-t-forms-textarea-input-element.component-ri0r0ujE.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-toggle-input-element.component-CXUqCipx.mjs +124 -0
- package/fesm2022/ngx-t-forms-toggle-input-element.component-CXUqCipx.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-token-text-input.component-BMzPBtY_.mjs → ngx-t-forms-token-text-input.component-BWmoGQfi.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-token-text-input.component-BMzPBtY_.mjs.map → ngx-t-forms-token-text-input.component-BWmoGQfi.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-DWDBsV6a.mjs → ngx-t-forms-validators-config.component-DEm9M5s9.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-validators-config.component-DWDBsV6a.mjs.map → ngx-t-forms-validators-config.component-DEm9M5s9.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-DxObFakZ.mjs → ngx-t-forms-workflow-adjudication.component-BOC9Z40E.mjs} +28 -26
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-BOC9Z40E.mjs.map +1 -0
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/package.json +2 -2
- package/types/ngx-t-forms.d.ts +2370 -38
- package/fesm2022/ngx-t-forms-api-endpoint-config.component-B4a-L4Eq.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-BhVM8PFR.mjs +0 -373
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-BhVM8PFR.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-6m2BM9e9.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-header-template-editor.component-NJLm6jkA.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-index-zLon09cE.mjs +0 -2
- package/fesm2022/ngx-t-forms-index-zLon09cE.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-custom.component-BOy_3JqU.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-CjUf0zTA.mjs +0 -38
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-CjUf0zTA.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BZxpJRxJ.mjs +0 -2472
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BZxpJRxJ.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-CaVyRedJ.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-paginated-selection-table-DzZE-Zde.mjs +0 -557
- package/fesm2022/ngx-t-forms-paginated-selection-table-DzZE-Zde.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-payload-template-editor.component-CVj-G4MC.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-BtfEsmva.mjs +0 -271
- package/fesm2022/ngx-t-forms-required-inputs.component-BtfEsmva.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-select-input-element.component-B03O4cAK.mjs +0 -160
- package/fesm2022/ngx-t-forms-select-input-element.component-B03O4cAK.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-textarea-input-element.component-GXiLEsTp.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-toggle-input-element.component-WErP0SsA.mjs +0 -93
- package/fesm2022/ngx-t-forms-toggle-input-element.component-WErP0SsA.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-DxObFakZ.mjs.map +0 -1
package/types/ngx-t-forms.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Provider, EnvironmentProviders, InjectionToken, Signal, OnInit, OnDestroy, PipeTransform,
|
|
2
|
+
import { Provider, EnvironmentProviders, Type, InjectionToken, Signal, OnInit, OnDestroy, PipeTransform, OnChanges, SimpleChanges, ElementRef } from '@angular/core';
|
|
3
3
|
import * as ngx_t_forms_types from 'ngx-t-forms-types';
|
|
4
|
-
import { NgxTFormsConfig, ElementTypes, FormInterface, APIDataFetchingConfigurationInterface, IFormActions, FormSlideInterface, InClassFormUtilsInterface, IWorkflowDocumentPicker, IBasicFormInput, IFileUploadInput, IDateRangePickerInput, ITextareaProperties, IToggleInput, IMatrixInput, IMultiple, IGetTreeResponse, IRunPipelineResponse, IPipelineGenerationResponse, InputDataTypes, FormInputBasicOptionInterface, LocalFormStateSelectorInterface, FormsStoreSelectorsInterface, FormListSection, ITowerFormSteps, WorkflowFunctionTypes, FileData, FormSubmissionStatus, IFormValidationOverride, FormColumnInputs, IFormChangeHistory, IStepOption, FormBuilderFunctions, ElementEditorTypes, ElementEditorInnerSectionElementInterface, ITowerStepColumn, ScoaInnerInput, IWorkflowOption, BlurHandleTypes, TreeNode, FlatNode, IArrayFunction, DocumentLitsLabelConfigInterfaceValueType, InputPipeTypes, NgxTFormsLocalization, ImportProgress, ImportIdentity, ImportRowState, EncryptedData, ValidationError, DialogConfig, PropertyPath, DeepPropertyValue, FileUploadInputValueInterface, FormInterfaceMigration, ConfigurationValidTestInterface } from 'ngx-t-forms-types';
|
|
5
|
-
export { BlurHandleTypes, ConfigurationValidTestInterface, DeepPropertyValue, DialogConfig, DocumentLitsLabelConfigInterfaceValueType, ElementEditorInnerSectionElementInterface, ElementEditorTypes, EncryptedData, FileUploadInputValueInterface, FormBuilderFunctions, FormColumnInputs, FormInputBasicOptionInterface, FormInterface, FormInterfaceMigration, FormListSection, FormSubmissionStatus, IArrayFunction, IFormActions, IFormChangeHistory, IFormTour, IFormValidationOverride, IGetTreeResponse, IScoaAccount, ITowerStepColumn, IWorkflowOption, ImportIdentity, ImportProgress, ImportRowState, ImportRowStatus, InClassFormUtilsInterface, InputDataTypes, InputPipeTypes, LocalFormStateSelectorInterface, NgxTFormsConfig, OLD_FormInterface, PropertyPath, TreeNode, ValidationError, WorkflowFunctionTypes } from 'ngx-t-forms-types';
|
|
4
|
+
import { NgxTFormsConfig, ElementTypes, FormInterface, APIDataFetchingConfigurationInterface, ImportRecipe, IFormActions, FormSlideInterface, InClassFormUtilsInterface, IWorkflowDocumentPicker, IBasicFormInput, IFileUploadInput, IDateRangePickerInput, ITextareaProperties, IToggleInput, IMatrixInput, IMultiple, IGetTreeResponse, IRunPipelineResponse, IPipelineGenerationResponse, InputDataTypes, FormInputBasicOptionInterface, DocumentLitsLabelConfigInterface, LocalFormStateSelectorInterface, FormsStoreSelectorsInterface, FormListSection, ITowerFormSteps, WorkflowFunctionTypes, FileData, FormSubmissionStatus, IFormValidationOverride, FormColumnInputs, IFormChangeHistory, IStepOption, FormBuilderFunctions, ElementEditorTypes, ElementEditorInnerSectionElementInterface, ITowerStepColumn, ScoaInnerInput, IWorkflowOption, BlurHandleTypes, TreeNode, FlatNode, IArrayFunction, DocumentLitsLabelConfigInterfaceValueType, InputPipeTypes, NgxTFormsLocalization, OptionMatchCriteria, ImportProgress, ImportIdentity, ImportRowState, SourceSheet, SourceTable, SourceVerdict, ColumnSource, SourceRow, ChoiceRule, ChoiceOutcome, MappedImport, RecipeCheck, TransformStep, RowRule, ImportRecipeSettings, SavedRecipeMatch, NarrowRule, RecipeIssue, EncryptedData, ValidationError, DialogConfig, PropertyPath, DeepPropertyValue, FileUploadInputValueInterface, FormInterfaceMigration, ConfigurationValidTestInterface } from 'ngx-t-forms-types';
|
|
5
|
+
export { BlurHandleTypes, ConfigurationValidTestInterface, DeepPropertyValue, DialogConfig, DocumentLitsLabelConfigInterfaceValueType, ElementEditorInnerSectionElementInterface, ElementEditorTypes, EncryptedData, FileUploadInputValueInterface, FormBuilderFunctions, FormColumnInputs, FormInputBasicOptionInterface, FormInterface, FormInterfaceMigration, FormListSection, FormSubmissionStatus, IArrayFunction, IFormActions, IFormChangeHistory, IFormTour, IFormValidationOverride, IGetTreeResponse, IScoaAccount, ITowerStepColumn, IWorkflowOption, ImportIdentity, ImportProgress, ImportRecipe, ImportRowState, ImportRowStatus, InClassFormUtilsInterface, InputDataTypes, InputPipeTypes, LocalFormStateSelectorInterface, NgxTFormsConfig, OLD_FormInterface, PropertyPath, TreeNode, ValidationError, WorkflowFunctionTypes } from 'ngx-t-forms-types';
|
|
6
6
|
import * as rxjs from 'rxjs';
|
|
7
7
|
import { Observable, Subject } from 'rxjs';
|
|
8
8
|
import { PipelineStage } from 'mongoose';
|
|
@@ -17,6 +17,8 @@ import * as ngx_ui_tour_core from 'ngx-ui-tour-core';
|
|
|
17
17
|
import { IStepOption as IStepOption$1 } from 'ngx-ui-tour-md-menu';
|
|
18
18
|
import { FlatTreeControl } from '@angular/cdk/tree';
|
|
19
19
|
import { MatTreeFlattener, MatTreeFlatDataSource } from '@angular/material/tree';
|
|
20
|
+
import { MatSelect } from '@angular/material/select';
|
|
21
|
+
import { ErrorStateMatcher } from '@angular/material/core';
|
|
20
22
|
import { MatDialogRef } from '@angular/material/dialog';
|
|
21
23
|
|
|
22
24
|
/** @internal */
|
|
@@ -31,7 +33,8 @@ declare const enum NgxTFormsFeatureKind {
|
|
|
31
33
|
AiFormBuilder = 7,
|
|
32
34
|
AiEndpointCatalog = 8,
|
|
33
35
|
AiMscoaGrounding = 9,
|
|
34
|
-
SpreadsheetImport = 10
|
|
36
|
+
SpreadsheetImport = 10,
|
|
37
|
+
MscoaAccounts = 11
|
|
35
38
|
}
|
|
36
39
|
interface NgxTFormsFeature {
|
|
37
40
|
readonly kind: NgxTFormsFeatureKind;
|
|
@@ -75,6 +78,197 @@ declare function provideNgxTForms(config: NgxTFormsConfig, ...features: NgxTForm
|
|
|
75
78
|
*/
|
|
76
79
|
declare function withHttpPipeline(): NgxTFormsFeature;
|
|
77
80
|
|
|
81
|
+
/**
|
|
82
|
+
* The chart-of-accounts navigation contract behind the mSCOA account browser.
|
|
83
|
+
*
|
|
84
|
+
* Every shape here mirrors one answer of the account-extraction API: a chart is
|
|
85
|
+
* addressed by its immutable *publication*, navigation is GUID-linked (never by
|
|
86
|
+
* name), and every account of a published chart is reachable by walking
|
|
87
|
+
* `children` down from its segment root. Nothing here depends on Angular or on
|
|
88
|
+
* the transport — see `MscoaAccountsRepository` for the operations and
|
|
89
|
+
* `HttpMscoaAccountsRepository` for the built-in HTTP adapter.
|
|
90
|
+
*
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
/** One segment file of a published chart (`ITEM`, `FUND`, …) with its sizes. */
|
|
94
|
+
interface MscoaChartSegment {
|
|
95
|
+
/** The segment file name, upper-case, exactly as the chart records carry it in `SCOAFile`. */
|
|
96
|
+
readonly file: string;
|
|
97
|
+
/** Accounts at the top of the segment — the ones with no parent. */
|
|
98
|
+
readonly rootCount: number;
|
|
99
|
+
/** Every account of the segment, headings included. */
|
|
100
|
+
readonly accountCount: number;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The published chart a browser reads: the version it belongs to, the
|
|
104
|
+
* publication every further read is addressed by, and its segments.
|
|
105
|
+
*/
|
|
106
|
+
interface MscoaChartPublication {
|
|
107
|
+
/** The mSCOA version key (`7.1`). */
|
|
108
|
+
readonly versionKey: string;
|
|
109
|
+
/** The immutable chart publication id every navigation read is pinned to. */
|
|
110
|
+
readonly publicationId: string;
|
|
111
|
+
/**
|
|
112
|
+
* The immutable publication of the version's budget-schedule mappings, or
|
|
113
|
+
* `null` while the version has none published. Handed to
|
|
114
|
+
* `MscoaAccountsRepository.account()` so a selected account comes back with
|
|
115
|
+
* every mapping of its GUID — the codes the budget schedules are built from.
|
|
116
|
+
*/
|
|
117
|
+
readonly mappingsPublicationId: string | null;
|
|
118
|
+
/** The segment files of the chart, in file order. */
|
|
119
|
+
readonly segments: readonly MscoaChartSegment[];
|
|
120
|
+
}
|
|
121
|
+
/** One navigation row: an account as it sits among its siblings. */
|
|
122
|
+
interface MscoaAccountNode {
|
|
123
|
+
/** The account GUID — the only link ever stored or followed. */
|
|
124
|
+
readonly guid: string;
|
|
125
|
+
/** The account's short description. */
|
|
126
|
+
readonly name: string;
|
|
127
|
+
/**
|
|
128
|
+
* Display name, with a counter when siblings share a name
|
|
129
|
+
* (`Specify (Add grant description) (2)`). Display only — never a link.
|
|
130
|
+
*/
|
|
131
|
+
readonly label: string;
|
|
132
|
+
/** The full Treasury account number. */
|
|
133
|
+
readonly accountNumber: string;
|
|
134
|
+
/** Depth in the segment, from the Treasury `SCOALevel` column. */
|
|
135
|
+
readonly level: number;
|
|
136
|
+
/** `Y` when the account takes postings, `N` for a heading. */
|
|
137
|
+
readonly posting: string;
|
|
138
|
+
/** `Y` when the account may be broken down further (relevant on the PROJECT segment). */
|
|
139
|
+
readonly breakdownAllowed: string;
|
|
140
|
+
/** Accounts directly beneath this one; `0` for a leaf. Decides expandability. */
|
|
141
|
+
readonly childCount: number;
|
|
142
|
+
/** The segment file the account belongs to. */
|
|
143
|
+
readonly segment: string;
|
|
144
|
+
}
|
|
145
|
+
/** One step of an account's path from its segment root. */
|
|
146
|
+
interface MscoaAccountAncestor {
|
|
147
|
+
readonly guid: string;
|
|
148
|
+
readonly name: string;
|
|
149
|
+
/** Display name among its own siblings (see {@link MscoaAccountNode.label}). */
|
|
150
|
+
readonly label: string;
|
|
151
|
+
readonly accountNumber: string;
|
|
152
|
+
readonly level: number;
|
|
153
|
+
}
|
|
154
|
+
/** What a search hit matched on. */
|
|
155
|
+
type MscoaAccountSearchMatch = 'guid' | 'accountNumber' | 'words';
|
|
156
|
+
/** One search hit, with its readable path for orientation. */
|
|
157
|
+
interface MscoaAccountSearchHit {
|
|
158
|
+
readonly guid: string;
|
|
159
|
+
readonly name: string;
|
|
160
|
+
readonly accountNumber: string;
|
|
161
|
+
/** The readable name path from the segment root (`Revenue:Exchange Revenue:Service Charges`). */
|
|
162
|
+
readonly path: string;
|
|
163
|
+
readonly segment: string;
|
|
164
|
+
readonly level: number;
|
|
165
|
+
/** `Y` when the account takes postings, `N` for a heading. */
|
|
166
|
+
readonly posting: string;
|
|
167
|
+
readonly match: MscoaAccountSearchMatch;
|
|
168
|
+
}
|
|
169
|
+
/** A page of search hits. */
|
|
170
|
+
interface MscoaAccountSearchResult {
|
|
171
|
+
readonly items: readonly MscoaAccountSearchHit[];
|
|
172
|
+
/** `true` when the word search ran out of time and the hits found so far were returned. */
|
|
173
|
+
readonly truncated: boolean;
|
|
174
|
+
}
|
|
175
|
+
/** How a search is scoped. */
|
|
176
|
+
interface MscoaAccountSearchOptions {
|
|
177
|
+
/** Restrict the hits to one segment file (`ITEM`). Absent or `null`: every segment. */
|
|
178
|
+
readonly segment?: string | null;
|
|
179
|
+
/** At most this many hits; the API caps it at 25. */
|
|
180
|
+
readonly limit?: number;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* The full account record: the Treasury chart columns (`SCOAid`, `AccountNumber`,
|
|
184
|
+
* `ShortDescription`, `PostingLevel`, …) keyed by column name, plus the `guid`.
|
|
185
|
+
*/
|
|
186
|
+
interface MscoaAccountRecord {
|
|
187
|
+
readonly guid: string;
|
|
188
|
+
readonly [column: string]: string | null | undefined;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* One budget-schedule mapping of an account: the schedule sheet it feeds
|
|
192
|
+
* (`A2A`, `SA1`, `IUDF`, …), the code on that sheet and the line's description.
|
|
193
|
+
*/
|
|
194
|
+
interface MscoaAccountMapping {
|
|
195
|
+
readonly sheet: string;
|
|
196
|
+
readonly code: string;
|
|
197
|
+
readonly description: string;
|
|
198
|
+
}
|
|
199
|
+
/** The budget-schedule mappings of an account, read from one mappings publication. */
|
|
200
|
+
interface MscoaAccountMappings {
|
|
201
|
+
/** The mappings publication they were read from; `null` when the version has none published. */
|
|
202
|
+
readonly publicationId: string | null;
|
|
203
|
+
/** One entry per mapped sheet; empty for an account that is not mapped to any schedule. */
|
|
204
|
+
readonly sheets: readonly MscoaAccountMapping[];
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* The full account read: the chart record together with every schedule
|
|
208
|
+
* mapping of its GUID. Both parts are stored on a selected account — see
|
|
209
|
+
* `toStoredMscoaAccount` — so nothing the budget exercise reads back is lost.
|
|
210
|
+
*/
|
|
211
|
+
interface MscoaAccountDetail {
|
|
212
|
+
readonly account: MscoaAccountRecord;
|
|
213
|
+
readonly mappings: MscoaAccountMappings;
|
|
214
|
+
}
|
|
215
|
+
/** An account found on a readable name path (`SCOAAccount`). */
|
|
216
|
+
interface MscoaResolvedPathAccount {
|
|
217
|
+
readonly guid: string;
|
|
218
|
+
readonly name: string;
|
|
219
|
+
readonly accountNumber: string;
|
|
220
|
+
readonly level: number;
|
|
221
|
+
/** `Y` when the account takes postings, `N` for a heading. */
|
|
222
|
+
readonly posting: string;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* How the built-in HTTP adapter reaches the mSCOA API. Passed to
|
|
226
|
+
* `withHttpMscoaAccounts()`.
|
|
227
|
+
*/
|
|
228
|
+
interface HttpMscoaAccountsOptions {
|
|
229
|
+
/**
|
|
230
|
+
* The mSCOA API root, e.g. `https://host/api/v1/mscoa`, or a function
|
|
231
|
+
* returning it — evaluated per request, so an environment-resolved URL can be
|
|
232
|
+
* supplied lazily. A trailing slash is tolerated.
|
|
233
|
+
*/
|
|
234
|
+
readonly baseUrl: string | (() => string);
|
|
235
|
+
/** Send credentials (cookies) with every request. Defaults to `true`. */
|
|
236
|
+
readonly withCredentials?: boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Pin every read to one chart version (`7.1`). Absent: the system default
|
|
239
|
+
* version, which is what the forms have always captured against.
|
|
240
|
+
*/
|
|
241
|
+
readonly versionKey?: string;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* @public
|
|
246
|
+
*
|
|
247
|
+
* Gives the mSCOA input its account browser: binds the built-in
|
|
248
|
+
* {@link HttpMscoaAccountsRepository} to `MSCOA_ACCOUNTS_REPOSITORY`, pointed at
|
|
249
|
+
* the mSCOA API's account-extraction routes. The browser then walks the chart
|
|
250
|
+
* lazily (segment roots, then the children of the headings a user opens) and
|
|
251
|
+
* searches on the server, so every account of the published chart is reachable.
|
|
252
|
+
*
|
|
253
|
+
* Requires `provideHttpClient()`. A consumer with another backend binds its own
|
|
254
|
+
* `MscoaAccountsRepository` against `MSCOA_ACCOUNTS_REPOSITORY` instead of (or
|
|
255
|
+
* after) this feature.
|
|
256
|
+
*
|
|
257
|
+
* @param options Where the API lives and how to call it.
|
|
258
|
+
*
|
|
259
|
+
* @example
|
|
260
|
+
* bootstrapApplication(AppComponent, {
|
|
261
|
+
* providers: [
|
|
262
|
+
* provideHttpClient(withInterceptors([authInterceptor])),
|
|
263
|
+
* provideNgxTForms(
|
|
264
|
+
* config,
|
|
265
|
+
* withHttpMscoaAccounts({ baseUrl: () => resolveUrl('{{$CLIENT_SERVER}}/api/v1/mscoa') }),
|
|
266
|
+
* ),
|
|
267
|
+
* ],
|
|
268
|
+
* });
|
|
269
|
+
*/
|
|
270
|
+
declare function withHttpMscoaAccounts(options: HttpMscoaAccountsOptions): NgxTFormsFeature;
|
|
271
|
+
|
|
78
272
|
/**
|
|
79
273
|
* Registers the HMAC secret used to derive per-input encryption keys for the
|
|
80
274
|
* signature input. Required only when the signature input is in use — if the
|
|
@@ -151,7 +345,13 @@ declare function withFormSuggestions(): NgxTFormsFeature;
|
|
|
151
345
|
* are reserved so that per-role model overrides written today keep working when
|
|
152
346
|
* the grounded specialists and the critic land in Phases 2–3.
|
|
153
347
|
*/
|
|
154
|
-
type AiFormBuilderRole = 'analyst' | 'architect' | 'generator' | 'dataSource' | 'mscoa' | 'logic' | 'critic'
|
|
348
|
+
type AiFormBuilderRole = 'analyst' | 'architect' | 'generator' | 'dataSource' | 'mscoa' | 'logic' | 'critic'
|
|
349
|
+
/**
|
|
350
|
+
* Drafts a form's description and picks its classifications from the form's
|
|
351
|
+
* content (the builder's Form details dialog). Worker tier; outside the drafting
|
|
352
|
+
* pipeline.
|
|
353
|
+
*/
|
|
354
|
+
| 'describer';
|
|
155
355
|
/**
|
|
156
356
|
* Lifecycle stage of a {@link DraftSession}.
|
|
157
357
|
*
|
|
@@ -829,7 +1029,9 @@ interface AiFormBuilderConfig {
|
|
|
829
1029
|
* {@link AI_FORM_BUILDER_CONFIG} and the default
|
|
830
1030
|
* {@link HashbrownFormDraftOrchestratorService} to {@link FORM_DRAFT_ORCHESTRATOR},
|
|
831
1031
|
* so a natural-language brief can be turned into a validated form definition and
|
|
832
|
-
* staged on the form-builder canvas for human review.
|
|
1032
|
+
* staged on the form-builder canvas for human review. It also turns on the AI
|
|
1033
|
+
* suggestion in the builder's Form details dialog (description + classification,
|
|
1034
|
+
* drafted from the form's content; role `describer`, worker tier).
|
|
833
1035
|
*
|
|
834
1036
|
* The library never persists a generated form and never holds an API key: the
|
|
835
1037
|
* consumer's own Hashbrown adapter owns the transport, and the human saves the
|
|
@@ -1191,6 +1393,71 @@ interface AiMscoaGrounding {
|
|
|
1191
1393
|
*/
|
|
1192
1394
|
declare function withAiMscoaGrounding(grounding: AiMscoaGrounding): NgxTFormsFeature;
|
|
1193
1395
|
|
|
1396
|
+
/**
|
|
1397
|
+
* @file The contract a host fulfils to let users save the column mappings
|
|
1398
|
+
* (import recipes) they make while importing a spreadsheet into a
|
|
1399
|
+
* multiple-input field, and reuse them on the next file of the same shape.
|
|
1400
|
+
*
|
|
1401
|
+
* The library never persists anything itself. A host that binds a store
|
|
1402
|
+
* through `withSpreadsheetImport(parser, { recipeStore })` decides where the
|
|
1403
|
+
* recipes live and who may change them; without one, a mapping lasts for the
|
|
1404
|
+
* import it was made in.
|
|
1405
|
+
*/
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* Why a write was refused rather than made.
|
|
1409
|
+
*
|
|
1410
|
+
* - `revision` — the recipe changed since it was loaded (someone else saved it).
|
|
1411
|
+
* - `name` — another recipe of the scope already has the name.
|
|
1412
|
+
* - `missing` — the recipe being updated or removed is no longer stored.
|
|
1413
|
+
*/
|
|
1414
|
+
interface ImportRecipeConflict {
|
|
1415
|
+
readonly reason: 'revision' | 'name' | 'missing';
|
|
1416
|
+
/** Id of the recipe the write addressed. */
|
|
1417
|
+
readonly recipeId: string;
|
|
1418
|
+
/** The name concerned: the stored recipe's for `revision`, the clashing one's for `name`. */
|
|
1419
|
+
readonly name: string;
|
|
1420
|
+
/** Who saved the stored revision, when known. */
|
|
1421
|
+
readonly updatedBy?: string;
|
|
1422
|
+
/** When the stored revision was saved (ISO), when known. */
|
|
1423
|
+
readonly updatedAt?: string;
|
|
1424
|
+
}
|
|
1425
|
+
/** The answer to a write: the scope's recipes as now stored, or why nothing was written. */
|
|
1426
|
+
type ImportRecipeWriteResult = {
|
|
1427
|
+
readonly kind: 'saved';
|
|
1428
|
+
readonly recipes: readonly ImportRecipe[];
|
|
1429
|
+
} | {
|
|
1430
|
+
readonly kind: 'conflict';
|
|
1431
|
+
readonly conflict: ImportRecipeConflict;
|
|
1432
|
+
};
|
|
1433
|
+
/**
|
|
1434
|
+
* Reads and writes the import recipes of one scope. For a multiple-input
|
|
1435
|
+
* field the scope is `field:<input id>` (see `fieldRecipeScope`), and a
|
|
1436
|
+
* recipe's `workflowId` carries the same scope.
|
|
1437
|
+
*
|
|
1438
|
+
* A refused write is answered with `kind: 'conflict'`, never an error; errors
|
|
1439
|
+
* are left for transport failures, which the import dialog shows as they are.
|
|
1440
|
+
*/
|
|
1441
|
+
interface ImportRecipeStore {
|
|
1442
|
+
/** The scope's recipes; empty when none were ever saved. */
|
|
1443
|
+
list(scope: string): Observable<readonly ImportRecipe[]>;
|
|
1444
|
+
/** Stores `recipe` as new, at revision 1. Refused with `name` when the name is taken. */
|
|
1445
|
+
create(scope: string, recipe: ImportRecipe): Observable<ImportRecipeWriteResult>;
|
|
1446
|
+
/**
|
|
1447
|
+
* Replaces the stored recipe with `recipe.id`, writing `recipe.revision + 1`.
|
|
1448
|
+
* Refused with `revision` when the stored revision differs, `name` when the
|
|
1449
|
+
* name clashes, `missing` when it is no longer stored.
|
|
1450
|
+
*/
|
|
1451
|
+
update(scope: string, recipe: ImportRecipe): Observable<ImportRecipeWriteResult>;
|
|
1452
|
+
/** Removes recipe `recipeId`. Refused with `missing` when it is no longer stored. */
|
|
1453
|
+
remove(scope: string, recipeId: string): Observable<ImportRecipeWriteResult>;
|
|
1454
|
+
/**
|
|
1455
|
+
* Whether the current user may remove `recipe` — say, its creator or an
|
|
1456
|
+
* admin. Absent, every saved recipe offers Remove.
|
|
1457
|
+
*/
|
|
1458
|
+
canRemove?(recipe: ImportRecipe): boolean;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1194
1461
|
/**
|
|
1195
1462
|
* @file The contract a host fulfils to let the library read — and write —
|
|
1196
1463
|
* spreadsheets.
|
|
@@ -1218,6 +1485,13 @@ interface SpreadsheetSheet {
|
|
|
1218
1485
|
* `boolean` and `null` are tolerated too.
|
|
1219
1486
|
*/
|
|
1220
1487
|
readonly rows: readonly Record<string, unknown>[];
|
|
1488
|
+
/**
|
|
1489
|
+
* The same sheet as a grid of cell texts, top to bottom, before any header
|
|
1490
|
+
* row is chosen — optional. When given, the import lets the user pick which
|
|
1491
|
+
* row holds the headers (a report with a title block above its table);
|
|
1492
|
+
* without it, row 1 is the header row and the grid is rebuilt from `rows`.
|
|
1493
|
+
*/
|
|
1494
|
+
readonly grid?: readonly (readonly string[])[];
|
|
1221
1495
|
}
|
|
1222
1496
|
/**
|
|
1223
1497
|
* A spreadsheet file in memory. The library hands the parser the file the user
|
|
@@ -1336,9 +1610,19 @@ type SpreadsheetWriter = (template: SpreadsheetTemplate) => Promise<SpreadsheetS
|
|
|
1336
1610
|
* menu, can be reused as-is. An `id` column is ignored: imported rows always
|
|
1337
1611
|
* receive fresh identities.
|
|
1338
1612
|
*
|
|
1613
|
+
* A file of any other shape — the user's own export — is mapped first: the
|
|
1614
|
+
* dialog suggests which column feeds which field, and the user can fill a
|
|
1615
|
+
* field from another column, a fixed value or several columns joined, clean a
|
|
1616
|
+
* column with typed transforms, match its texts to options, and leave rows
|
|
1617
|
+
* out by rule. A parser that also returns each sheet's `grid` lets the user
|
|
1618
|
+
* pick the header row. Pass a `recipeStore` and such mappings can be saved
|
|
1619
|
+
* per field and are offered again for a file of the same shape.
|
|
1620
|
+
*
|
|
1339
1621
|
* @param parser Reads a picked file's bytes into header-keyed rows per sheet.
|
|
1340
1622
|
* @param options.writer Serialises the import template the library builds for
|
|
1341
1623
|
* a field. Optional; without it no template is offered.
|
|
1624
|
+
* @param options.recipeStore Saves and lists column mappings
|
|
1625
|
+
* ({@link IMPORT_RECIPE_STORE}). Optional; without it mappings are not saved.
|
|
1342
1626
|
*
|
|
1343
1627
|
* @example
|
|
1344
1628
|
* provideNgxTForms(
|
|
@@ -1361,6 +1645,7 @@ type SpreadsheetWriter = (template: SpreadsheetTemplate) => Promise<SpreadsheetS
|
|
|
1361
1645
|
*/
|
|
1362
1646
|
declare function withSpreadsheetImport(parser: SpreadsheetParser, options?: {
|
|
1363
1647
|
readonly writer?: SpreadsheetWriter;
|
|
1648
|
+
readonly recipeStore?: Type<ImportRecipeStore>;
|
|
1364
1649
|
}): NgxTFormsFeature;
|
|
1365
1650
|
|
|
1366
1651
|
/**
|
|
@@ -1429,6 +1714,68 @@ declare const MULTIPLE_FORM_INPUT_TOKEN: InjectionToken<IMultiple>;
|
|
|
1429
1714
|
*/
|
|
1430
1715
|
declare const MSCOA_TREE_PROVIDER: InjectionToken<() => Observable<IGetTreeResponse>>;
|
|
1431
1716
|
|
|
1717
|
+
/**
|
|
1718
|
+
* @public
|
|
1719
|
+
*
|
|
1720
|
+
* The chart-of-accounts reads behind the mSCOA account browser (LP §9 repository
|
|
1721
|
+
* pattern). Navigation is GUID-linked and lazy: a browser asks for one
|
|
1722
|
+
* publication, then for the roots of one segment, then for the children of the
|
|
1723
|
+
* headings a user opens — never for the whole chart. Search runs on the server.
|
|
1724
|
+
*
|
|
1725
|
+
* Everything below {@link MscoaAccountsRepository.publication} is addressed by a
|
|
1726
|
+
* publication id, so its answers never change and may be cached indefinitely.
|
|
1727
|
+
*
|
|
1728
|
+
* The default implementation is {@link HttpMscoaAccountsRepository}, bound by
|
|
1729
|
+
* `withHttpMscoaAccounts()`. A consumer with another backend binds its own
|
|
1730
|
+
* implementation against `MSCOA_ACCOUNTS_REPOSITORY` instead.
|
|
1731
|
+
*/
|
|
1732
|
+
declare abstract class MscoaAccountsRepository {
|
|
1733
|
+
/**
|
|
1734
|
+
* The published chart of a version — its publication id and segments.
|
|
1735
|
+
*
|
|
1736
|
+
* @param versionKey The version to read (`7.1`); absent, the system default.
|
|
1737
|
+
*/
|
|
1738
|
+
abstract publication(versionKey?: string): Observable<MscoaChartPublication>;
|
|
1739
|
+
/** The root accounts (no parent) of one segment, with sibling labels and child counts. */
|
|
1740
|
+
abstract roots(publicationId: string, segment: string): Observable<readonly MscoaAccountNode[]>;
|
|
1741
|
+
/** The accounts directly beneath a heading, sorted by account number. */
|
|
1742
|
+
abstract children(publicationId: string, guid: string): Observable<readonly MscoaAccountNode[]>;
|
|
1743
|
+
/** The path from the segment root down to the account, inclusive. */
|
|
1744
|
+
abstract ancestors(publicationId: string, guid: string): Observable<readonly MscoaAccountAncestor[]>;
|
|
1745
|
+
/**
|
|
1746
|
+
* The full account record together with every budget-schedule mapping of its
|
|
1747
|
+
* GUID (the `A2A`, `SA1`, `IUDF`, `MTSF`, … codes the schedules are built
|
|
1748
|
+
* from). The mappings are read from `mappingsPublicationId` — the one the
|
|
1749
|
+
* chart's {@link MscoaChartPublication.mappingsPublicationId} names; `null`
|
|
1750
|
+
* means the version has none published and answers no mappings. Errors when
|
|
1751
|
+
* the GUID is not in the publication.
|
|
1752
|
+
*/
|
|
1753
|
+
abstract account(publicationId: string, guid: string, mappingsPublicationId: string | null): Observable<MscoaAccountDetail>;
|
|
1754
|
+
/**
|
|
1755
|
+
* Search by GUID prefix, account-number prefix or words of the readable path;
|
|
1756
|
+
* at most 25 hits. Word search needs 3 characters or more.
|
|
1757
|
+
*/
|
|
1758
|
+
abstract search(publicationId: string, query: string, options?: MscoaAccountSearchOptions): Observable<MscoaAccountSearchResult>;
|
|
1759
|
+
/**
|
|
1760
|
+
* Every account whose readable name path (`SCOAAccount`) equals `path`, for
|
|
1761
|
+
* settings that name an account by path. An empty list when none does.
|
|
1762
|
+
*/
|
|
1763
|
+
abstract resolvePath(versionKey: string, path: string): Observable<readonly MscoaResolvedPathAccount[]>;
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
/**
|
|
1767
|
+
* @public
|
|
1768
|
+
*
|
|
1769
|
+
* Binds the {@link MscoaAccountsRepository} the mSCOA account browser reads the
|
|
1770
|
+
* chart of accounts through. `withHttpMscoaAccounts()` binds the built-in HTTP
|
|
1771
|
+
* adapter; a consumer may bind its own implementation with `useClass` (or a
|
|
1772
|
+
* `useValue` for a mock) instead of, or after, the feature.
|
|
1773
|
+
*
|
|
1774
|
+
* When nothing is bound, the mSCOA input still renders and validates, but its
|
|
1775
|
+
* account picker reports that browsing is not configured.
|
|
1776
|
+
*/
|
|
1777
|
+
declare const MSCOA_ACCOUNTS_REPOSITORY: InjectionToken<MscoaAccountsRepository>;
|
|
1778
|
+
|
|
1432
1779
|
/**
|
|
1433
1780
|
* Provides the top-level `NgxTFormsConfig` supplied by the consumer when
|
|
1434
1781
|
* calling `provideNgxTForms`. This is the root configuration token from
|
|
@@ -1527,6 +1874,18 @@ declare const INPUT_SECRET_TOKEN: InjectionToken<string>;
|
|
|
1527
1874
|
*/
|
|
1528
1875
|
declare const FORM_ROUTE_SOURCE: InjectionToken<Observable<string | undefined>>;
|
|
1529
1876
|
|
|
1877
|
+
/**
|
|
1878
|
+
* The submit button's label for a form whose definition carries no
|
|
1879
|
+
* `submissionHandle.submissionMessage`.
|
|
1880
|
+
*
|
|
1881
|
+
* Provide it where the form is hosted — `{ provide: DEFAULT_SUBMIT_LABEL, useValue: 'Complete step' }`
|
|
1882
|
+
* on the host component — so the button speaks the host's own verb instead of
|
|
1883
|
+
* the generic default. A form's authored message always wins.
|
|
1884
|
+
*
|
|
1885
|
+
* @public
|
|
1886
|
+
*/
|
|
1887
|
+
declare const DEFAULT_SUBMIT_LABEL: InjectionToken<string>;
|
|
1888
|
+
|
|
1530
1889
|
/**
|
|
1531
1890
|
* @file Pure domain types for the **AI edit-suggestion reporting layer**.
|
|
1532
1891
|
*
|
|
@@ -2083,6 +2442,69 @@ declare const SPREADSHEET_PARSER: InjectionToken<SpreadsheetParser>;
|
|
|
2083
2442
|
*/
|
|
2084
2443
|
declare const SPREADSHEET_WRITER: InjectionToken<SpreadsheetWriter>;
|
|
2085
2444
|
|
|
2445
|
+
/**
|
|
2446
|
+
* Where the multiple-input import saves column mappings — see {@link ImportRecipeStore}.
|
|
2447
|
+
*
|
|
2448
|
+
* Bound by `withSpreadsheetImport(parser, { recipeStore })`. Unbound by
|
|
2449
|
+
* default: the import dialog injects it optionally and, without it, offers no
|
|
2450
|
+
* saving — a mapping lasts for the import it was made in.
|
|
2451
|
+
*/
|
|
2452
|
+
declare const IMPORT_RECIPE_STORE: InjectionToken<ImportRecipeStore>;
|
|
2453
|
+
|
|
2454
|
+
/**
|
|
2455
|
+
* @file The contract a host fulfils to show, inside the document-list
|
|
2456
|
+
* label-config editor, what report a label configuration will produce.
|
|
2457
|
+
*
|
|
2458
|
+
* The library never plans a report itself: the report planner lives on the
|
|
2459
|
+
* host's server. A host that binds `REPORT_PLAN_PREVIEW` answers with a count
|
|
2460
|
+
* of what the plan holds and any field-level warnings; without one the editor
|
|
2461
|
+
* shows no preview at all.
|
|
2462
|
+
*/
|
|
2463
|
+
|
|
2464
|
+
/** What one label configuration produces, as counted by the host's report planner. */
|
|
2465
|
+
interface ReportPlanPreview {
|
|
2466
|
+
/** How many KPI tiles, charts and comparisons the plan holds. */
|
|
2467
|
+
summary: {
|
|
2468
|
+
kpis: number;
|
|
2469
|
+
charts: number;
|
|
2470
|
+
comparisons: number;
|
|
2471
|
+
};
|
|
2472
|
+
/** Field-level notes, keyed by the column's `formControlName` (e.g. a guarded dimension refused). */
|
|
2473
|
+
warnings: Array<{
|
|
2474
|
+
controlName: string;
|
|
2475
|
+
message: string;
|
|
2476
|
+
}>;
|
|
2477
|
+
}
|
|
2478
|
+
/**
|
|
2479
|
+
* Plans the given label configuration and reports what it produces. Called on
|
|
2480
|
+
* every (debounced) configuration change; a newer call supersedes an older
|
|
2481
|
+
* one, and an error simply hides the counts behind "Preview unavailable".
|
|
2482
|
+
*/
|
|
2483
|
+
type ReportPlanPreviewFn = (labelConfiguration: DocumentLitsLabelConfigInterface[]) => Observable<ReportPlanPreview>;
|
|
2484
|
+
|
|
2485
|
+
/**
|
|
2486
|
+
* @public
|
|
2487
|
+
*
|
|
2488
|
+
* The host's report-plan call — see {@link ReportPlanPreviewFn}. Lets the
|
|
2489
|
+
* document-list label-config editor say "This setup produces 4 KPIs, 7 charts
|
|
2490
|
+
* and 3 comparisons" while an admin marks fields as reportable.
|
|
2491
|
+
*
|
|
2492
|
+
* Unbound by default: the editor injects it optionally and, without it,
|
|
2493
|
+
* renders no preview line.
|
|
2494
|
+
*
|
|
2495
|
+
* @example
|
|
2496
|
+
* providers: [
|
|
2497
|
+
* {
|
|
2498
|
+
* provide: REPORT_PLAN_PREVIEW,
|
|
2499
|
+
* useFactory: () => {
|
|
2500
|
+
* const http = inject(HttpClient);
|
|
2501
|
+
* return (labelConfiguration) => http.post<ReportPlanPreview>('/api/report-plan', { labelConfiguration });
|
|
2502
|
+
* },
|
|
2503
|
+
* },
|
|
2504
|
+
* ]
|
|
2505
|
+
*/
|
|
2506
|
+
declare const REPORT_PLAN_PREVIEW: InjectionToken<ReportPlanPreviewFn>;
|
|
2507
|
+
|
|
2086
2508
|
/**
|
|
2087
2509
|
* @public
|
|
2088
2510
|
*
|
|
@@ -2105,6 +2527,40 @@ declare class HttpPipelineRepository implements PipelineRepository {
|
|
|
2105
2527
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<HttpPipelineRepository>;
|
|
2106
2528
|
}
|
|
2107
2529
|
|
|
2530
|
+
/**
|
|
2531
|
+
* @public
|
|
2532
|
+
*
|
|
2533
|
+
* The built-in {@link MscoaAccountsRepository}: the account-extraction routes of
|
|
2534
|
+
* the mSCOA API (`/versions/:key/accounts`, `/publications/:pub/accounts/…`),
|
|
2535
|
+
* reached through the consumer's `HttpClient`. Bound by `withHttpMscoaAccounts()`.
|
|
2536
|
+
*
|
|
2537
|
+
* The default version is resolved through `/latestVersion` the first time a
|
|
2538
|
+
* publication is asked for without a key; concurrent callers share that one
|
|
2539
|
+
* round trip. Publication-addressed answers are immutable, and the API says so
|
|
2540
|
+
* in its cache headers, so no client-side cache is kept here.
|
|
2541
|
+
*
|
|
2542
|
+
* Requires `provideHttpClient()` in the application.
|
|
2543
|
+
*/
|
|
2544
|
+
declare class HttpMscoaAccountsRepository extends MscoaAccountsRepository {
|
|
2545
|
+
#private;
|
|
2546
|
+
/** {@inheritDoc MscoaAccountsRepository.publication} */
|
|
2547
|
+
publication(versionKey?: string): Observable<MscoaChartPublication>;
|
|
2548
|
+
/** {@inheritDoc MscoaAccountsRepository.roots} */
|
|
2549
|
+
roots(publicationId: string, segment: string): Observable<readonly MscoaAccountNode[]>;
|
|
2550
|
+
/** {@inheritDoc MscoaAccountsRepository.children} */
|
|
2551
|
+
children(publicationId: string, guid: string): Observable<readonly MscoaAccountNode[]>;
|
|
2552
|
+
/** {@inheritDoc MscoaAccountsRepository.ancestors} */
|
|
2553
|
+
ancestors(publicationId: string, guid: string): Observable<readonly MscoaAccountAncestor[]>;
|
|
2554
|
+
/** {@inheritDoc MscoaAccountsRepository.account} */
|
|
2555
|
+
account(publicationId: string, guid: string, mappingsPublicationId: string | null): Observable<MscoaAccountDetail>;
|
|
2556
|
+
/** {@inheritDoc MscoaAccountsRepository.search} */
|
|
2557
|
+
search(publicationId: string, query: string, options?: MscoaAccountSearchOptions): Observable<MscoaAccountSearchResult>;
|
|
2558
|
+
/** {@inheritDoc MscoaAccountsRepository.resolvePath} */
|
|
2559
|
+
resolvePath(versionKey: string, path: string): Observable<readonly MscoaResolvedPathAccount[]>;
|
|
2560
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HttpMscoaAccountsRepository, never>;
|
|
2561
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<HttpMscoaAccountsRepository>;
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2108
2564
|
/**
|
|
2109
2565
|
* @file Default {@link FormSuggestionRegistry} implementation — a root-level
|
|
2110
2566
|
* mediator between per-component form towers and external AI subscribers.
|
|
@@ -2639,6 +3095,8 @@ declare abstract class FormTowerControllerService implements OnDestroy {
|
|
|
2639
3095
|
private _http;
|
|
2640
3096
|
/** Resolved tower config (HTTP functions, file upload, getGlobalVariables, …). */
|
|
2641
3097
|
readonly NGX_T_FORMS_CONFIG: ngx_t_forms_types.NgxTFormsConfig;
|
|
3098
|
+
/** The host's submit label for a form with no authored `submissionMessage` ({@link DEFAULT_SUBMIT_LABEL}). */
|
|
3099
|
+
readonly defaultSubmitLabel: string;
|
|
2642
3100
|
/** Convenience pass-through to the global-variables fetcher from config. */
|
|
2643
3101
|
readonly getGlobalVariables: () => Observable<ngx_t_forms_types.GlobalVariables>;
|
|
2644
3102
|
constructor(_http: HttpClient);
|
|
@@ -2919,6 +3377,10 @@ declare abstract class FormTowerControllerService implements OnDestroy {
|
|
|
2919
3377
|
* source data). The array-remap branch is UNCHANGED (Phase 2 fence).
|
|
2920
3378
|
* - **Everything else** → write `#model` from the dotted-path or top-level value.
|
|
2921
3379
|
*
|
|
3380
|
+
* A completable complex value ({@link mergesDerivedValue}) is seeded like any
|
|
3381
|
+
* other, and its fold is rebuilt first so the derived value the tower already
|
|
3382
|
+
* holds is applied over the seed in full — see `applyValue` below.
|
|
3383
|
+
*
|
|
2922
3384
|
* Ends with a liveness lead-read so lazy resources start even in the headless
|
|
2923
3385
|
* import path (no template reader) — HAZARD 2 / Blueprint §2.7.
|
|
2924
3386
|
*
|
|
@@ -3079,6 +3541,41 @@ declare abstract class FormTowerControllerService implements OnDestroy {
|
|
|
3079
3541
|
refreshInput: (inputId: string) => Observable<void>;
|
|
3080
3542
|
/** True iff the input has at least one refreshable `#derived` entry. */
|
|
3081
3543
|
canRefreshFn: (inputId: string) => boolean;
|
|
3544
|
+
/**
|
|
3545
|
+
* Whether an input's options fetch binds the field's own search box (a
|
|
3546
|
+
* `searchTerm` mapped input or a `{{@search}}` template token) AND the fetch
|
|
3547
|
+
* is wired in the current graph. When `false` the field's search box only
|
|
3548
|
+
* filters the loaded options locally.
|
|
3549
|
+
*
|
|
3550
|
+
* @param inputId - The options field.
|
|
3551
|
+
* @returns `true` when typing in the search box should re-fire the fetch.
|
|
3552
|
+
*/
|
|
3553
|
+
isOptionsSearchBound: (inputId: string) => boolean;
|
|
3554
|
+
/**
|
|
3555
|
+
* Sends a search-box term to an input's search-bound options fetch. Trimmed;
|
|
3556
|
+
* a term equal to the current one is a no-op, so repeated keystrokes that
|
|
3557
|
+
* settle on the same text never re-fire the request.
|
|
3558
|
+
*
|
|
3559
|
+
* @param inputId - The options field.
|
|
3560
|
+
* @param term - The raw search-box text.
|
|
3561
|
+
*/
|
|
3562
|
+
setOptionsSearchTerm: (inputId: string, term: string) => void;
|
|
3563
|
+
/**
|
|
3564
|
+
* The term an input's options fetch currently searches with (`''` for none).
|
|
3565
|
+
* Untracked — used to seed a re-created search box, not to react.
|
|
3566
|
+
*
|
|
3567
|
+
* @param inputId - The options field.
|
|
3568
|
+
* @returns The current term.
|
|
3569
|
+
*/
|
|
3570
|
+
optionsSearchTerm: (inputId: string) => string;
|
|
3571
|
+
/**
|
|
3572
|
+
* Whether an input's options fetch is in flight. Reactive: reading it in a
|
|
3573
|
+
* template or `computed` re-evaluates when the fetch starts or settles.
|
|
3574
|
+
*
|
|
3575
|
+
* @param inputId - The options field.
|
|
3576
|
+
* @returns `true` while the options request is loading or reloading.
|
|
3577
|
+
*/
|
|
3578
|
+
isOptionsLoading: (inputId: string) => boolean;
|
|
3082
3579
|
/**
|
|
3083
3580
|
* True iff any input in the section is refreshable. The HTML refresh-button
|
|
3084
3581
|
* gate (`user-form-stepper.component.html`) depends on this exact truth value
|
|
@@ -3207,6 +3704,16 @@ declare class TFormEngine extends FormTowerControllerService {
|
|
|
3207
3704
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TFormEngine>;
|
|
3208
3705
|
}
|
|
3209
3706
|
|
|
3707
|
+
/** Visual tone of the user form's status line. */
|
|
3708
|
+
type UserFormStatusTone = 'neutral' | 'success' | 'error';
|
|
3709
|
+
/** The user form stepper's one-line status: plain text plus a tone for styling. */
|
|
3710
|
+
interface UserFormStatus {
|
|
3711
|
+
/** Short, sentence-case status copy without emoji (fits one footer line). */
|
|
3712
|
+
readonly text: string;
|
|
3713
|
+
/** Drives the colour; `error` is only ever returned after a submit attempt. */
|
|
3714
|
+
readonly tone: UserFormStatusTone;
|
|
3715
|
+
}
|
|
3716
|
+
|
|
3210
3717
|
declare class TourManagerService {
|
|
3211
3718
|
private readonly tourService;
|
|
3212
3719
|
userProfile: this;
|
|
@@ -3249,6 +3756,14 @@ declare class TourManagerService {
|
|
|
3249
3756
|
* - _None._ Submission and lifecycle events are dispatched through the
|
|
3250
3757
|
* inherited `FormTowerControllerService` and the consumer's
|
|
3251
3758
|
* `formActions` / `formBuilder` callbacks.
|
|
3759
|
+
*
|
|
3760
|
+
* Layout contract for hosts: the sticky submission footer carries the stable
|
|
3761
|
+
* class `lib-user-form-footer` and is 64px tall (80px below 600px, where the
|
|
3762
|
+
* status line takes its own row). A floating widget outside this component
|
|
3763
|
+
* (e.g. an assistant bubble) cannot inherit CSS variables from it, so it should
|
|
3764
|
+
* key off `body:has(.lib-user-form-footer)` and lift itself by those heights.
|
|
3765
|
+
* `--lib-user-form-footer-height` on the host element (class `lib-user-form`)
|
|
3766
|
+
* carries the same value for descendants only.
|
|
3252
3767
|
*/
|
|
3253
3768
|
declare class UserFormStepperComponent {
|
|
3254
3769
|
#private;
|
|
@@ -3311,8 +3826,39 @@ declare class UserFormStepperComponent {
|
|
|
3311
3826
|
* nothing else.
|
|
3312
3827
|
*/
|
|
3313
3828
|
protected readonly visibleSteps: _angular_core.Signal<TowerFormStep[]>;
|
|
3829
|
+
/**
|
|
3830
|
+
* The steps the template actually renders as <mat-step>s (a step without a
|
|
3831
|
+
* section form is skipped). This is the list MatStepper's `selectedIndex`
|
|
3832
|
+
* indexes, so every index-based lookup must read it, not {@link visibleSteps}.
|
|
3833
|
+
*/
|
|
3834
|
+
protected readonly renderedSteps: _angular_core.Signal<TowerFormStep[]>;
|
|
3835
|
+
/**
|
|
3836
|
+
* True when the form renders exactly one section. The stepper header ("1
|
|
3837
|
+
* Details") is then pure chrome, so it is hidden and the section's content
|
|
3838
|
+
* sits flush in the page.
|
|
3839
|
+
*/
|
|
3840
|
+
protected readonly isSingleStep: _angular_core.Signal<boolean>;
|
|
3841
|
+
/**
|
|
3842
|
+
* True once the user has tried to submit. Until then the footer reports
|
|
3843
|
+
* neutral progress only; validation errors are surfaced after an attempt.
|
|
3844
|
+
*/
|
|
3845
|
+
protected readonly submitAttempted: _angular_core.WritableSignal<boolean>;
|
|
3846
|
+
/** True while the footer asks the user to confirm discarding their input. */
|
|
3847
|
+
protected readonly confirmingReset: _angular_core.WritableSignal<boolean>;
|
|
3848
|
+
/** DOM id of the reset question, unique per instance so aria-labelledby never resolves to another form. */
|
|
3849
|
+
protected readonly resetQuestionId: string;
|
|
3850
|
+
/** The footer Reset button; focus returns here when the confirmation closes. */
|
|
3851
|
+
private readonly resetButton;
|
|
3852
|
+
/** The confirmation's safe choice; it takes focus when the question opens. */
|
|
3853
|
+
private readonly keepButton;
|
|
3314
3854
|
/** Whether the form is editable / can be navigated freely. */
|
|
3315
3855
|
isEditable: boolean;
|
|
3856
|
+
/**
|
|
3857
|
+
* True when at least one rendered field can still be changed. A review or
|
|
3858
|
+
* read-only form (every field readonly or disabled) has nothing to discard,
|
|
3859
|
+
* so the footer offers no Reset there.
|
|
3860
|
+
*/
|
|
3861
|
+
protected readonly canReset: _angular_core.Signal<boolean>;
|
|
3316
3862
|
/** True while the form definition is being fetched. */
|
|
3317
3863
|
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
3318
3864
|
protected readonly tourManagerService: TourManagerService;
|
|
@@ -3324,6 +3870,10 @@ declare class UserFormStepperComponent {
|
|
|
3324
3870
|
* @param event The keyboard event object.
|
|
3325
3871
|
*/
|
|
3326
3872
|
onKeyDown(event: KeyboardEvent): void;
|
|
3873
|
+
/**
|
|
3874
|
+
* Fetches the form definition through the consumer's `formBuilder.getForm`
|
|
3875
|
+
* hook and initialises the engine with it. No-op without an id.
|
|
3876
|
+
*/
|
|
3327
3877
|
loadForm(formId: string | undefined): void;
|
|
3328
3878
|
/**
|
|
3329
3879
|
* Builder-function shim passed to inputs that need callbacks (e.g.
|
|
@@ -3333,12 +3883,50 @@ declare class UserFormStepperComponent {
|
|
|
3333
3883
|
* are stubbed because they have no meaning outside the form builder.
|
|
3334
3884
|
*/
|
|
3335
3885
|
get formBuilderFunctions(): FormBuilderFunctions;
|
|
3886
|
+
/** Material step state for a section: edit when selected, error only once touched. */
|
|
3336
3887
|
getStepState(step: ITowerFormSteps, index: number): StepState;
|
|
3888
|
+
/** Label of the section before the selected one (for the Back button's accessible name). */
|
|
3337
3889
|
getPreviousStepLabel(): string | undefined;
|
|
3890
|
+
/** Label of the section after the selected one (for the Next button's accessible name). */
|
|
3338
3891
|
getNextStepLabel(): string | undefined;
|
|
3892
|
+
/** Whether a section's form group is currently valid. */
|
|
3339
3893
|
canProceedToNextStep(step: ITowerFormSteps): boolean;
|
|
3894
|
+
/**
|
|
3895
|
+
* Legacy emoji-prefixed status line (warns before the user has touched
|
|
3896
|
+
* anything). The footer now renders {@link submissionStatus}; kept for any
|
|
3897
|
+
* caller that still reads it.
|
|
3898
|
+
*
|
|
3899
|
+
* @deprecated Use {@link submissionStatus}.
|
|
3900
|
+
*/
|
|
3340
3901
|
get getSubmissionStatus(): string;
|
|
3902
|
+
/**
|
|
3903
|
+
* The footer's one-line status: neutral progress ("2 of 3 required fields")
|
|
3904
|
+
* until the user attempts to submit, then what still needs attention.
|
|
3905
|
+
*/
|
|
3906
|
+
get submissionStatus(): UserFormStatus;
|
|
3907
|
+
/**
|
|
3908
|
+
* Whether the primary action is disabled. It stays enabled while blocking
|
|
3909
|
+
* errors remain so that pressing it reveals them (a dead grey button explains
|
|
3910
|
+
* nothing). It is disabled only while a submission is in flight, or when the
|
|
3911
|
+
* one thing left is an override motivation, which the adjacent "Provide
|
|
3912
|
+
* reason" button asks for.
|
|
3913
|
+
*/
|
|
3914
|
+
get submitDisabled(): boolean;
|
|
3915
|
+
/**
|
|
3916
|
+
* Submits the form, or, when it is not yet submittable, marks every field as
|
|
3917
|
+
* touched and moves to the first section that needs attention instead.
|
|
3918
|
+
*/
|
|
3341
3919
|
handleSubmit(): void;
|
|
3920
|
+
/**
|
|
3921
|
+
* Asks the user to confirm before anything they entered is discarded. Focus
|
|
3922
|
+
* moves to "Keep" (the safe choice) inside the labelled question group, so
|
|
3923
|
+
* the question is announced and Escape cancels.
|
|
3924
|
+
*/
|
|
3925
|
+
requestReset(): void;
|
|
3926
|
+
/** Dismisses the reset confirmation, keeps the user's input and returns focus to Reset. */
|
|
3927
|
+
cancelReset(): void;
|
|
3928
|
+
/** Discards the user's input, returning the form to its initial values and first section. */
|
|
3929
|
+
confirmReset(): void;
|
|
3342
3930
|
/** Still-failing overridable validations the user may motivate to submit. */
|
|
3343
3931
|
get overridableErrors(): OverridableError[];
|
|
3344
3932
|
/** True while a blocking (non-overridable) error keeps submission impossible. */
|
|
@@ -3356,12 +3944,17 @@ declare class UserFormStepperComponent {
|
|
|
3356
3944
|
* writes back through the engine, so the submit gate updates live on close.
|
|
3357
3945
|
*/
|
|
3358
3946
|
openOverrideDialog(): void;
|
|
3947
|
+
/** True when at least one field in the form carries configured tour copy. */
|
|
3359
3948
|
get hasTour(): boolean;
|
|
3360
3949
|
/**
|
|
3361
|
-
*
|
|
3362
|
-
*
|
|
3950
|
+
* Starts the form's guided tour: a short welcome, the first section, each
|
|
3951
|
+
* configured field tip (with a hop at every section change) and the submit
|
|
3952
|
+
* button. Titles are plain sentence case with no emoji, and a step is only
|
|
3953
|
+
* added when it has an anchor, so the step count the host shows matches what
|
|
3954
|
+
* the user will actually see.
|
|
3363
3955
|
*/
|
|
3364
3956
|
startTour(): void;
|
|
3957
|
+
/** Re-runs a section's data sources (the header's refresh button). */
|
|
3365
3958
|
refreshASection(sectionId: string): void;
|
|
3366
3959
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserFormStepperComponent, never>;
|
|
3367
3960
|
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; }; "showAiSuggestions": { "alias": "showAiSuggestions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -3975,6 +4568,19 @@ declare class TFormDraftPanelComponent {
|
|
|
3975
4568
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TFormDraftPanelComponent, "t-form-draft-panel", never, { "session": { "alias": "session"; "required": true; "isSignal": true; }; "busy": { "alias": "busy"; "required": false; "isSignal": true; }; }, { "describe": "describe"; "build": "build"; "stage": "stage"; "discard": "discard"; }, never, never, true, never>;
|
|
3976
4569
|
}
|
|
3977
4570
|
|
|
4571
|
+
/**
|
|
4572
|
+
* Formats a raw value for display: dates, currency, rounded numbers, booleans
|
|
4573
|
+
* and relative ages, in the consumer's localization.
|
|
4574
|
+
*
|
|
4575
|
+
* Impure on purpose: a template that passes no localization argument depends on
|
|
4576
|
+
* the installed localization signal, which a pure pipe would never re-read once
|
|
4577
|
+
* its arguments were memoised — a cold load rendered before the organisation's
|
|
4578
|
+
* localization arrived would keep the library defaults (`ZAR350,633.00`) for the
|
|
4579
|
+
* session. A one-entry memo keyed on the arguments AND the installed value keeps
|
|
4580
|
+
* the per-check cost at a few identity comparisons.
|
|
4581
|
+
*
|
|
4582
|
+
* @public
|
|
4583
|
+
*/
|
|
3978
4584
|
declare class FormatDataPipe implements PipeTransform {
|
|
3979
4585
|
#private;
|
|
3980
4586
|
/**
|
|
@@ -3993,12 +4599,16 @@ declare class FormatDataPipe implements PipeTransform {
|
|
|
3993
4599
|
* agree. A `decimal` / `integer` column is only formatted when its pipe
|
|
3994
4600
|
* configuration is passed; without it the value shows as stored.
|
|
3995
4601
|
*
|
|
4602
|
+
* Dates read `14 Oct 2026` (`datetime-local` / `dateTime` add the time of
|
|
4603
|
+
* day) unless the organisation configured a fixed date pattern.
|
|
4604
|
+
*
|
|
3996
4605
|
* `localization` is the consumer's `NgxTFormsConfig.localization` (or the
|
|
3997
4606
|
* library's resolved copy): the locale amounts and dates are written in, the
|
|
3998
4607
|
* currency a column without a code falls back to and how it is displayed, the
|
|
3999
4608
|
* zone times of day are shown in, and the plain-date format. Pass it from the
|
|
4000
4609
|
* template (`| formatData: type : pipe : l10n()`) so the cell re-renders when
|
|
4001
|
-
* the organisation changes
|
|
4610
|
+
* the organisation changes. Omitted, the installed localization is used when
|
|
4611
|
+
* there is one, else the library defaults.
|
|
4002
4612
|
*
|
|
4003
4613
|
* @param value - The raw value to format.
|
|
4004
4614
|
* @param dataType - Which formatting branch to apply.
|
|
@@ -4011,14 +4621,134 @@ declare class FormatDataPipe implements PipeTransform {
|
|
|
4011
4621
|
static ɵpipe: _angular_core.ɵɵPipeDeclaration<FormatDataPipe, "formatData", true>;
|
|
4012
4622
|
}
|
|
4013
4623
|
|
|
4624
|
+
/**
|
|
4625
|
+
* The parts of a field descriptor the formatter reads. Structural and loose on
|
|
4626
|
+
* purpose: hosts hand over stored form snapshots, builder columns and tower
|
|
4627
|
+
* descriptors alike, and each carries a slightly different subset.
|
|
4628
|
+
*/
|
|
4629
|
+
interface FieldDisplaySource {
|
|
4630
|
+
/** Renderer, e.g. `select`, `datePicker`. */
|
|
4631
|
+
readonly element?: string;
|
|
4632
|
+
/** HTML input type of a basic input, e.g. `date`, `datetime-local`. */
|
|
4633
|
+
readonly type?: string;
|
|
4634
|
+
/** Declared value type, e.g. `number`, `date`, `currency`. */
|
|
4635
|
+
readonly dataType?: string;
|
|
4636
|
+
/** Display pipe (currency code, places, date pattern). */
|
|
4637
|
+
readonly pipe?: FormColumnInputs['pipe'];
|
|
4638
|
+
/** Option source of a choice field; `optionType: 'user'` marks a people picker. */
|
|
4639
|
+
readonly matOptions?: {
|
|
4640
|
+
readonly optionType?: string;
|
|
4641
|
+
readonly options?: readonly unknown[];
|
|
4642
|
+
} | null;
|
|
4643
|
+
/** Toggle wording for `true`. */
|
|
4644
|
+
readonly trueLabel?: string;
|
|
4645
|
+
/** Toggle wording for `false`. */
|
|
4646
|
+
readonly falseLabel?: string;
|
|
4647
|
+
}
|
|
4648
|
+
type OptionRecord = Record<string, unknown>;
|
|
4649
|
+
/** True for `null`, `undefined`, `''` and an empty list — nothing to print. */
|
|
4650
|
+
declare function isEmptyDisplayValue(value: unknown): boolean;
|
|
4651
|
+
/**
|
|
4652
|
+
* An identifier-shaped key as words: `fixedPriceContracts` → `Fixed price
|
|
4653
|
+
* contracts`. Anything that is not identifier-shaped (it already has spaces,
|
|
4654
|
+
* capitals at the start, digits only…) is returned untouched, so a real label
|
|
4655
|
+
* is never re-cased.
|
|
4656
|
+
*
|
|
4657
|
+
* @param key - The stored key.
|
|
4658
|
+
* @param titleCase - Capitalise every word (a person's name) instead of the first only.
|
|
4659
|
+
*/
|
|
4660
|
+
declare function humaniseKey(key: string, titleCase?: boolean): string;
|
|
4661
|
+
/**
|
|
4662
|
+
* A user option's full name: an explicit full or display name, else first and
|
|
4663
|
+
* last name, else the option's label; `undefined` when it carries none of them.
|
|
4664
|
+
*/
|
|
4665
|
+
declare function personNameOf(option: OptionRecord): string | undefined;
|
|
4666
|
+
/**
|
|
4667
|
+
* The read-only text for a field's stored value — see the file header for the
|
|
4668
|
+
* rules. Returns `''` for an empty value, so the caller decides how "nothing"
|
|
4669
|
+
* reads. Never throws.
|
|
4670
|
+
*
|
|
4671
|
+
* @param value - The stored value.
|
|
4672
|
+
* @param field - The field's descriptor (element, type, pipe, options).
|
|
4673
|
+
* @param localization - The consumer localization (`NgxTFormsConfig.localization`, or the
|
|
4674
|
+
* library's resolved copy); omitted, the library defaults.
|
|
4675
|
+
*/
|
|
4676
|
+
declare function formatFieldDisplayValue(value: unknown, field: FieldDisplaySource | null | undefined, localization?: NgxTFormsLocalization | null): string;
|
|
4677
|
+
|
|
4678
|
+
/**
|
|
4679
|
+
* Prints a form field's stored value the way every read-only surface should:
|
|
4680
|
+
* money in the organisation's currency format, dates as `14 Oct 2026` (time of
|
|
4681
|
+
* day only for a field that has one), people by full name and choices by their
|
|
4682
|
+
* option label. See `formatFieldDisplayValue` for the rules.
|
|
4683
|
+
*
|
|
4684
|
+
* Pass the field's descriptor so the pipe knows what the value is. The third
|
|
4685
|
+
* argument is optional: omitted, the pipe follows the localization
|
|
4686
|
+
* `provideNgxTForms()` installed — including its later emissions (the
|
|
4687
|
+
* organisation's localization arriving after a cold load, an organisation
|
|
4688
|
+
* switch). That is why the pipe is impure: a pure pipe memoises on its
|
|
4689
|
+
* arguments and would never re-read the installed signal. A one-entry memo
|
|
4690
|
+
* keyed on the arguments and the installed value keeps each check to a few
|
|
4691
|
+
* identity comparisons.
|
|
4692
|
+
*
|
|
4693
|
+
* @example
|
|
4694
|
+
* {{ field.value | fieldDisplayValue: field }}
|
|
4695
|
+
* {{ row[col] | fieldDisplayValue: innerInput : l10n() }}
|
|
4696
|
+
*
|
|
4697
|
+
* @public
|
|
4698
|
+
*/
|
|
4699
|
+
declare class FieldDisplayValuePipe implements PipeTransform {
|
|
4700
|
+
#private;
|
|
4701
|
+
/**
|
|
4702
|
+
* @param value - The stored value.
|
|
4703
|
+
* @param field - The field's descriptor (element, type, pipe, options).
|
|
4704
|
+
* @param localization - Optional consumer localization; defaults to the installed one.
|
|
4705
|
+
* @returns The display text, `''` when there is nothing to show.
|
|
4706
|
+
*/
|
|
4707
|
+
transform(value: unknown, field: FieldDisplaySource | null | undefined, localization?: NgxTFormsLocalization): string;
|
|
4708
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FieldDisplayValuePipe, never>;
|
|
4709
|
+
static ɵpipe: _angular_core.ɵɵPipeDeclaration<FieldDisplayValuePipe, "fieldDisplayValue", true>;
|
|
4710
|
+
}
|
|
4711
|
+
|
|
4712
|
+
/**
|
|
4713
|
+
* The comparison key of a text: trimmed, inner whitespace collapsed, case
|
|
4714
|
+
* folded. Numbers, booleans and dates compare by their text; anything else
|
|
4715
|
+
* (objects, lists) never matches.
|
|
4716
|
+
*/
|
|
4717
|
+
declare function normaliseOptionText(value: unknown): string;
|
|
4718
|
+
/**
|
|
4719
|
+
* The criteria a mapped row carries for its cell `formControlName` under
|
|
4720
|
+
* {@link OPTION_MATCH_KEY}, when it carries well-formed ones.
|
|
4721
|
+
*/
|
|
4722
|
+
declare function optionMatchCriteriaOf(row: Record<string, unknown> | undefined, formControlName: string): OptionMatchCriteria | undefined;
|
|
4723
|
+
/**
|
|
4724
|
+
* Words for a cell's criteria — `Code "A12", Region "KZN"` — for messages
|
|
4725
|
+
* naming why a text that names an option still matched none.
|
|
4726
|
+
*/
|
|
4727
|
+
declare function describeOptionMatchCriteria(criteria: OptionMatchCriteria): string;
|
|
4014
4728
|
/**
|
|
4015
4729
|
* Writes the user's pick for an ambiguous text back into a raw import row:
|
|
4016
4730
|
* the cell becomes `value` for a single select; for a multi-select cell every
|
|
4017
|
-
* entry equal to `text` becomes `value`
|
|
4018
|
-
*
|
|
4731
|
+
* entry equal to `text` becomes `value` — a text the cell's commas had split
|
|
4732
|
+
* included — and the rest stand. Re-running the row then resolves the pick by
|
|
4733
|
+
* stored value, so it can never tie again.
|
|
4019
4734
|
*/
|
|
4020
4735
|
declare function applyOptionChoice(row: Record<string, unknown>, formControlName: string, text: string, value: unknown, multi: boolean): Record<string, unknown>;
|
|
4021
4736
|
|
|
4737
|
+
/**
|
|
4738
|
+
* What a column asks of the person filling the sheet.
|
|
4739
|
+
*
|
|
4740
|
+
* - `required` — the form requires a value.
|
|
4741
|
+
* - `optional` — may be left blank.
|
|
4742
|
+
* - `conditional` — required only when the input's display condition holds;
|
|
4743
|
+
* leave blank otherwise.
|
|
4744
|
+
* - `system` — filled by the system (calculated, fetched, inherited, disabled,
|
|
4745
|
+
* read-only with a default); leave blank. Not in the data sheet.
|
|
4746
|
+
* - `detail` — a form's MultipleInput: the rows live in the detail sheet named
|
|
4747
|
+
* after the field. The column stays on the main sheet as a marker.
|
|
4748
|
+
* - `unsupported` — cannot travel through a cell (a file, a signature, an
|
|
4749
|
+
* image, an adjudication). Not in the data sheet.
|
|
4750
|
+
*/
|
|
4751
|
+
type ImportColumnFill = 'required' | 'optional' | 'conditional' | 'system' | 'detail' | 'unsupported';
|
|
4022
4752
|
/**
|
|
4023
4753
|
* One allowed option of a choice column, as the template lists it: what the
|
|
4024
4754
|
* form shows for it — a label, a user's name and email, a table row's shown
|
|
@@ -4036,6 +4766,12 @@ interface ImportTemplateOption {
|
|
|
4036
4766
|
* offered.
|
|
4037
4767
|
*/
|
|
4038
4768
|
readonly when?: readonly ImportOptionCondition[];
|
|
4769
|
+
/**
|
|
4770
|
+
* Named facts about the option a source-file mapping can match or narrow
|
|
4771
|
+
* by: a table row's shown columns by key, a list option's other primitive
|
|
4772
|
+
* members, a user option's `username` and `email`. Absent when it has none.
|
|
4773
|
+
*/
|
|
4774
|
+
readonly attributes?: Readonly<Record<string, string>>;
|
|
4039
4775
|
}
|
|
4040
4776
|
/** One value another input must hold for an option to be offered. */
|
|
4041
4777
|
interface ImportOptionCondition {
|
|
@@ -4064,6 +4800,59 @@ interface ImportOptionList {
|
|
|
4064
4800
|
* forms; a host may build its own.
|
|
4065
4801
|
*/
|
|
4066
4802
|
type ImportOptionLists = ReadonlyMap<string, ImportOptionList>;
|
|
4803
|
+
/** One spreadsheet column a form, or a multiple-input field, can be fed from. */
|
|
4804
|
+
interface ImportColumn {
|
|
4805
|
+
/**
|
|
4806
|
+
* The header the column is read from — the input's `formControlName`, or an
|
|
4807
|
+
* expanded key such as `glAccount.accrual.FUND.debit` for an mSCOA segment.
|
|
4808
|
+
* Also the key the settled row reports the value (and any error) under.
|
|
4809
|
+
*/
|
|
4810
|
+
readonly key: string;
|
|
4811
|
+
/** Human label, shown beside the key in the guide and the expected-columns list. */
|
|
4812
|
+
readonly label: string;
|
|
4813
|
+
/** What the column asks of the user — see {@link ImportColumnFill}. */
|
|
4814
|
+
readonly fill: ImportColumnFill;
|
|
4815
|
+
/** Whether the user must supply a value: `fill === 'required'`. */
|
|
4816
|
+
readonly required: boolean;
|
|
4817
|
+
/** `false` for values that cannot travel through a cell (`fill === 'unsupported'`). */
|
|
4818
|
+
readonly importable: boolean;
|
|
4819
|
+
/** Other header spellings accepted for this column, matched case-insensitively. */
|
|
4820
|
+
readonly aliases: readonly string[];
|
|
4821
|
+
/** What to type into the column's cells, in a sentence or two. */
|
|
4822
|
+
readonly hint: string;
|
|
4823
|
+
/** The display condition that gates the input, in words, when it has one. */
|
|
4824
|
+
readonly condition?: string;
|
|
4825
|
+
/** The allowed options of a choice column, when known — static, or loaded by the caller. */
|
|
4826
|
+
readonly options?: ImportOptionList;
|
|
4827
|
+
/**
|
|
4828
|
+
* The option attributes the field's configuration declares — a paginated
|
|
4829
|
+
* selection table's shown columns — whether or not any option was loaded,
|
|
4830
|
+
* so a source-file mapping can match or narrow by them before the import
|
|
4831
|
+
* loads the rows. Absent when the configuration declares none; the loaded
|
|
4832
|
+
* options' own `attributes` are the other source.
|
|
4833
|
+
*/
|
|
4834
|
+
readonly optionAttributes?: readonly ImportOptionAttribute[];
|
|
4835
|
+
}
|
|
4836
|
+
/** One option attribute a choice field's configuration declares. */
|
|
4837
|
+
interface ImportOptionAttribute {
|
|
4838
|
+
/** The attribute's key, as `ImportTemplateOption.attributes` carries it. */
|
|
4839
|
+
readonly key: string;
|
|
4840
|
+
/** What the field calls it — a table column's heading; the key when it has none. */
|
|
4841
|
+
readonly label: string;
|
|
4842
|
+
}
|
|
4843
|
+
/** One sheet of a form's import template, with the columns it carries. */
|
|
4844
|
+
interface ImportSheet {
|
|
4845
|
+
/** The sheet's tab name: {@link MAIN_SHEET}, or a MultipleInput's `formControlName`. */
|
|
4846
|
+
readonly name: string;
|
|
4847
|
+
/** Human label of what a row of the sheet is. */
|
|
4848
|
+
readonly label: string;
|
|
4849
|
+
/** `main` holds the records; a `detail` sheet the rows of one MultipleInput. */
|
|
4850
|
+
readonly kind: 'main' | 'detail';
|
|
4851
|
+
/** How the sheet is filled in, in a sentence or two — the guide's lead row for it. */
|
|
4852
|
+
readonly description: string;
|
|
4853
|
+
/** The columns, in form order; a detail sheet leads with {@link DETAIL_INDEX_COLUMN}. */
|
|
4854
|
+
readonly columns: readonly ImportColumn[];
|
|
4855
|
+
}
|
|
4067
4856
|
/** Options of {@link buildFormImportTemplate}. */
|
|
4068
4857
|
interface FormImportTemplateOptions {
|
|
4069
4858
|
/**
|
|
@@ -4077,6 +4866,15 @@ interface FormImportTemplateOptions {
|
|
|
4077
4866
|
* carries are listed, and a fetched list is described as loaded by the form.
|
|
4078
4867
|
*/
|
|
4079
4868
|
readonly options?: ImportOptionLists;
|
|
4869
|
+
/**
|
|
4870
|
+
* Records to fill the data sheets with — rows shaped as the import reads
|
|
4871
|
+
* them (keyed by column key, each MultipleInput an array of sub-rows), such
|
|
4872
|
+
* as a source-file mapping produces. Main-sheet rows go in order; sub-rows
|
|
4873
|
+
* go to their detail sheet with `$index` naming their record. Keys a data
|
|
4874
|
+
* sheet has no column for are left out. Absent, the data sheets carry
|
|
4875
|
+
* headers only, as before.
|
|
4876
|
+
*/
|
|
4877
|
+
readonly rows?: readonly Record<string, unknown>[];
|
|
4080
4878
|
}
|
|
4081
4879
|
/** Name of the template sheet that explains the data sheets' columns. */
|
|
4082
4880
|
declare const TEMPLATE_GUIDE_SHEET = "Guide";
|
|
@@ -4086,6 +4884,53 @@ declare const TEMPLATE_GUIDE_SHEET = "Guide";
|
|
|
4086
4884
|
* only when at least one column has a known option list.
|
|
4087
4885
|
*/
|
|
4088
4886
|
declare const TEMPLATE_OPTIONS_SHEET = "Options";
|
|
4887
|
+
/**
|
|
4888
|
+
* Name of the sheet a host may add to a filled template it hands back after a
|
|
4889
|
+
* check, listing what each failing cell needs. It holds no data: detection and
|
|
4890
|
+
* the template match leave it out, like the guide and options sheets, so the
|
|
4891
|
+
* file re-imports as the template it is.
|
|
4892
|
+
*/
|
|
4893
|
+
declare const TEMPLATE_ISSUES_SHEET = "Issues";
|
|
4894
|
+
/** Name of the sheet that holds a form template's records, one per row. */
|
|
4895
|
+
declare const MAIN_SHEET = "main";
|
|
4896
|
+
/**
|
|
4897
|
+
* Header of the column a detail sheet links its rows to the main sheet with:
|
|
4898
|
+
* the 1-based number of the record row they belong to.
|
|
4899
|
+
*/
|
|
4900
|
+
declare const DETAIL_INDEX_COLUMN = "$index";
|
|
4901
|
+
/**
|
|
4902
|
+
* Text a main-sheet MultipleInput cell may carry to say the record has rows in
|
|
4903
|
+
* the detail sheet. Informational: the import reads the detail sheet whether
|
|
4904
|
+
* or not the marker is there.
|
|
4905
|
+
*/
|
|
4906
|
+
declare const SHEET_BOUND_MARKER = "$sheetBound";
|
|
4907
|
+
/** The subset of a MultipleInput column the column description reads. */
|
|
4908
|
+
type MultipleInputColumn = Pick<FormColumnInputs, 'id' | 'formInputs'>;
|
|
4909
|
+
/**
|
|
4910
|
+
* Lists the columns a sheet should carry to fill `input`, one per child input
|
|
4911
|
+
* (or per expanded leaf for mSCOA and date-range children).
|
|
4912
|
+
*
|
|
4913
|
+
* Section titles and children without a `formControlName` own no column. The
|
|
4914
|
+
* order follows `formInputs`, so the list reads like the row editor. A
|
|
4915
|
+
* MultipleInput child is a JSON-array column, since a field's sheet has no
|
|
4916
|
+
* detail sheets of its own.
|
|
4917
|
+
*
|
|
4918
|
+
* @param input The MultipleInput column whose children define the row.
|
|
4919
|
+
* @param options Option lists loaded for the children, keyed by child id.
|
|
4920
|
+
*/
|
|
4921
|
+
declare function describeImportColumns(input: MultipleInputColumn, options?: ImportOptionLists): ImportColumn[];
|
|
4922
|
+
/**
|
|
4923
|
+
* Lists the sheets a form's import template carries: {@link MAIN_SHEET} with
|
|
4924
|
+
* one column per top-level input, then one detail sheet per MultipleInput
|
|
4925
|
+
* column, named after it and led by {@link DETAIL_INDEX_COLUMN}.
|
|
4926
|
+
*
|
|
4927
|
+
* Section titles and inputs without a `formControlName` own no column. The
|
|
4928
|
+
* order follows the form's slides and columns.
|
|
4929
|
+
*
|
|
4930
|
+
* @param form The form definition.
|
|
4931
|
+
* @param options Option lists loaded for the form's choice inputs.
|
|
4932
|
+
*/
|
|
4933
|
+
declare function describeFormImportSheets(form: Pick<FormInterface, 'slides'>, options?: ImportOptionLists): ImportSheet[];
|
|
4089
4934
|
/**
|
|
4090
4935
|
* Builds the import template for a whole form: a {@link MAIN_SHEET} sheet with
|
|
4091
4936
|
* one column per top-level input the user may fill, one detail sheet per
|
|
@@ -4239,6 +5084,22 @@ declare class TFormImportController {
|
|
|
4239
5084
|
* duplicate overlays its status; this is what a release restores.
|
|
4240
5085
|
*/
|
|
4241
5086
|
private readonly _verdicts;
|
|
5087
|
+
/**
|
|
5088
|
+
* Rows the user chose to keep through {@link keepRow}, at most one per
|
|
5089
|
+
* duplicate group. Cleared when a session starts and by {@link reset}.
|
|
5090
|
+
*/
|
|
5091
|
+
private readonly _preferred;
|
|
5092
|
+
/**
|
|
5093
|
+
* Each group keeper's combination of its group's number cells
|
|
5094
|
+
* (`ImportIdentity.combine`), planned at the start of every pass of
|
|
5095
|
+
* {@link _drain}. Empty when the session combines nothing.
|
|
5096
|
+
*/
|
|
5097
|
+
private _combinations;
|
|
5098
|
+
/**
|
|
5099
|
+
* The combination each checked row was checked with — `null` for its own
|
|
5100
|
+
* cells alone — so a row whose group has changed since is checked again.
|
|
5101
|
+
*/
|
|
5102
|
+
private readonly _checkedWith;
|
|
4242
5103
|
/**
|
|
4243
5104
|
* Reactive progress stream — subscribe to track each row in real time.
|
|
4244
5105
|
*/
|
|
@@ -4275,8 +5136,15 @@ declare class TFormImportController {
|
|
|
4275
5136
|
* the earlier row — and, under the default `skip` policy, never gets a
|
|
4276
5137
|
* tower when the sheet already shows the repeat. A repeat that only shows
|
|
4277
5138
|
* once labels and codes have resolved is recognised after the row settles.
|
|
4278
|
-
*
|
|
4279
|
-
* of
|
|
5139
|
+
* With `identity.combine`, the kept row of each group is checked with the
|
|
5140
|
+
* group's combined values in place of its own (see
|
|
5141
|
+
* {@link ImportRowState.combined}); a group that only shows once rows have
|
|
5142
|
+
* settled costs its kept row a second check. With `identity.lists`, the
|
|
5143
|
+
* repeats inside each record's lists are folded before the record is
|
|
5144
|
+
* checked (see {@link ImportRowState.folded}).
|
|
5145
|
+
* Rejects, before any state changes, when a key or a combined field is not a
|
|
5146
|
+
* `formControlName` of the form, a combined field is a key, an op does not
|
|
5147
|
+
* fit its field, or a list rule names something that is not a list.
|
|
4280
5148
|
*
|
|
4281
5149
|
* @param form The form definition every row is validated against.
|
|
4282
5150
|
* @param rows Raw data objects — one per import row.
|
|
@@ -4350,7 +5218,9 @@ declare class TFormImportController {
|
|
|
4350
5218
|
* without a tower, under `skip` — when the repeat shows in the raw data),
|
|
4351
5219
|
* and rows that repeated it may be released back to their own verdicts.
|
|
4352
5220
|
* A released row that was never processed is processed now, before this
|
|
4353
|
-
* resolves. Only rows after `rowIndex` can be affected
|
|
5221
|
+
* resolves. Only rows after `rowIndex` can be affected — except, under
|
|
5222
|
+
* `ImportIdentity.combine`, the kept row of a group the row is or was in,
|
|
5223
|
+
* which is checked again with the group's new numbers.
|
|
4354
5224
|
*
|
|
4355
5225
|
* Rejects when no bulk session holds `rowIndex` (none was run, a
|
|
4356
5226
|
* multiple-input run or {@link reset} has since cleared it, or the index is
|
|
@@ -4366,6 +5236,33 @@ declare class TFormImportController {
|
|
|
4366
5236
|
* const next = await importCtrl.rerunImportRow(state.rowIndex, fixed);
|
|
4367
5237
|
*/
|
|
4368
5238
|
rerunImportRow(rowIndex: number, row: Record<string, unknown>): Promise<ImportRowState>;
|
|
5239
|
+
/**
|
|
5240
|
+
* Keeps row `rowIndex` as the record of its duplicate group in the session
|
|
5241
|
+
* the last {@link runImport} or {@link runMultipleInputImport} started,
|
|
5242
|
+
* instead of the row `ImportIdentity.keep` chose. The choice wins over
|
|
5243
|
+
* `keep` for that group until the session ends.
|
|
5244
|
+
*
|
|
5245
|
+
* The kept row is processed if it was held before its tower was built, and
|
|
5246
|
+
* this resolves once it has settled. No other row is checked: the only rows
|
|
5247
|
+
* it can queue are ones its own new outcome releases from its group, which
|
|
5248
|
+
* were held, never reached. The row kept before it is reported as its
|
|
5249
|
+
* duplicate with its own verdict retained, so switching back needs no
|
|
5250
|
+
* re-check. Rows of other groups stand.
|
|
5251
|
+
*
|
|
5252
|
+
* Rejects when no session holds `rowIndex`, or the session was given no
|
|
5253
|
+
* {@link ImportIdentity}, or while rows are being checked (a run in
|
|
5254
|
+
* progress, paused or stopping, or a re-check not yet settled), or when the
|
|
5255
|
+
* session still has `pending` rows — a run was {@link stop}ped before
|
|
5256
|
+
* reaching them. Keeping a row then would check those rows silently; run the
|
|
5257
|
+
* import again instead. Rows held as duplicates are not `pending` and never
|
|
5258
|
+
* block it.
|
|
5259
|
+
*
|
|
5260
|
+
* @param rowIndex - The row to keep (`ImportRowState.rowIndex`).
|
|
5261
|
+
* @returns The kept row's state.
|
|
5262
|
+
*/
|
|
5263
|
+
keepRow(rowIndex: number): Promise<ImportRowState>;
|
|
5264
|
+
/** How a row of the current session is checked — bulk or multiple-input — or `null` when none was run. */
|
|
5265
|
+
private _sessionProcess;
|
|
4369
5266
|
/**
|
|
4370
5267
|
* Re-checks ONE row of the multiple-input session the last
|
|
4371
5268
|
* {@link runMultipleInputImport} started — after the user settled an
|
|
@@ -4677,7 +5574,8 @@ declare class TFormImportController {
|
|
|
4677
5574
|
* leaving every derived sub-field null (and dropped by `getFormValueNames`).
|
|
4678
5575
|
*
|
|
4679
5576
|
* Deep-clones `node` (never mutates the shared form definition) and strips the
|
|
4680
|
-
* `${parentId}.` prefix from any `inputId`
|
|
5577
|
+
* `${parentId}.` prefix from any `inputId` — and from the `inputSourceId` of a
|
|
5578
|
+
* value inherited from a sibling — that targets a sibling in THIS
|
|
4681
5579
|
* MultipleInput, so the sub-tower's signal graph resolves dependencies exactly
|
|
4682
5580
|
* as the live form does.
|
|
4683
5581
|
*
|
|
@@ -4734,6 +5632,18 @@ declare class TFormImportController {
|
|
|
4734
5632
|
* boolean control. Blank stays blank.
|
|
4735
5633
|
*/
|
|
4736
5634
|
private _processToggleInput;
|
|
5635
|
+
/**
|
|
5636
|
+
* Pre-processor for date and date-time picker inputs.
|
|
5637
|
+
*
|
|
5638
|
+
* A picker writes a `Date`, and the tower relies on it: an API whose
|
|
5639
|
+
* `minimumInputRequired` maps a `date` input fires only for one, so a sheet's
|
|
5640
|
+
* `"2025-07-01"` left as text would keep every date-driven fetch (a project's
|
|
5641
|
+
* phases by its start and end dates) idle and the fields it fills empty. The
|
|
5642
|
+
* cell is read by {@link resolveDateCell} — `yyyy-mm-dd` is local midnight,
|
|
5643
|
+
* as a picked day is — and anything that is not a date is `invalidDate`
|
|
5644
|
+
* rather than text written to a date control. Blank stays blank.
|
|
5645
|
+
*/
|
|
5646
|
+
private _processDateInput;
|
|
4737
5647
|
/**
|
|
4738
5648
|
* Pre-processor for rich-text (Editor) inputs.
|
|
4739
5649
|
*
|
|
@@ -4757,7 +5667,11 @@ declare class TFormImportController {
|
|
|
4757
5667
|
* matched against its options through {@link resolveOptionCell}: a stored
|
|
4758
5668
|
* value stands, a unique label (or table column value) becomes the stored
|
|
4759
5669
|
* value, a tie is kept for the user, an unmatched text on a strict field is
|
|
4760
|
-
* an error.
|
|
5670
|
+
* an error. A strict field whose option list is still empty — its fetch
|
|
5671
|
+
* failed or answered nothing, or a field it depends on is blank or wrong —
|
|
5672
|
+
* is refused with `optionsUnavailable:<text>` rather than passed as typed;
|
|
5673
|
+
* a lenient field keeps its text, and a hidden input, which loads no
|
|
5674
|
+
* options by design, is not judged. A swap
|
|
4761
5675
|
* can change what a dependent option list fetches, so after any swap the
|
|
4762
5676
|
* tower settles again and the pass repeats, until a pass changes nothing or
|
|
4763
5677
|
* {@link MAX_OPTION_PASSES} is reached.
|
|
@@ -4774,11 +5688,32 @@ declare class TFormImportController {
|
|
|
4774
5688
|
* @param rejected - `formControlName`s a pre-processor already reported an
|
|
4775
5689
|
* error for; their cells are not judged again (the pre-processor's verdict
|
|
4776
5690
|
* stands, and the cell it refused still reaches the tower as raw text).
|
|
5691
|
+
* @param held - Ids of document pickers whose texts were held out of the
|
|
5692
|
+
* tower (see {@link _holdDocumentPickerTexts}); judged while still blank.
|
|
5693
|
+
* @param mapped - The row as a source-file mapping produced it. Its
|
|
5694
|
+
* {@link OPTION_MATCH_KEY} names, per cell, the other columns the option
|
|
5695
|
+
* must agree with; the options are matched only among those that agree
|
|
5696
|
+
* with every one, so a label shared by several options is settled by its
|
|
5697
|
+
* code, region… A text that names options of which none agrees is refused
|
|
5698
|
+
* with `optionCriteriaUnmatched:<text>`.
|
|
4777
5699
|
* @returns Blocking column errors (`ambiguousOption:<text>`,
|
|
4778
|
-
* `invalidOption:<text>`, `
|
|
4779
|
-
*
|
|
5700
|
+
* `invalidOption:<text>`, `optionCriteriaUnmatched:<text>`,
|
|
5701
|
+
* `optionsUnavailable:<text>`, `documentLookupFailed`; several joined with
|
|
5702
|
+
* `.`) and the choices left for the user, both keyed by `formControlName`.
|
|
4780
5703
|
*/
|
|
4781
5704
|
private _resolveOptionValues;
|
|
5705
|
+
/**
|
|
5706
|
+
* The row as the tower first sees it: every document picker whose cell
|
|
5707
|
+
* names a transaction by text (a reference, a label, a shown column) is left
|
|
5708
|
+
* blank. A picker stores a reference, never text, and an input fetching by
|
|
5709
|
+
* the picker's id would otherwise ask the server for the text — one failed
|
|
5710
|
+
* request per row before {@link _resolveOptionValues} swaps it. The texts are
|
|
5711
|
+
* looked up from the untouched row afterwards, and only the reference they
|
|
5712
|
+
* name is written.
|
|
5713
|
+
*
|
|
5714
|
+
* @returns The row to initialise the tower with, and the ids of the pickers held back.
|
|
5715
|
+
*/
|
|
5716
|
+
private _holdDocumentPickerTexts;
|
|
4782
5717
|
/**
|
|
4783
5718
|
* Whether the tower holds `cell` for an input — i.e. the imported cell was
|
|
4784
5719
|
* applied rather than displaced by a tower-owned value. Compared as text so
|
|
@@ -4827,26 +5762,71 @@ declare class TFormImportController {
|
|
|
4827
5762
|
*/
|
|
4828
5763
|
private _collectColErrors;
|
|
4829
5764
|
/**
|
|
4830
|
-
*
|
|
4831
|
-
*
|
|
4832
|
-
*
|
|
4833
|
-
*
|
|
4834
|
-
*
|
|
4835
|
-
|
|
4836
|
-
|
|
5765
|
+
* The list columns whose settled rows leave a required child empty, each with
|
|
5766
|
+
* the gaps as nested `[<index>].<child>.required` errors.
|
|
5767
|
+
*
|
|
5768
|
+
* The live form refuses such a row from its rendered table
|
|
5769
|
+
* ({@link missingRequiredFields}), which an import never renders — so a list
|
|
5770
|
+
* the tower fills (rows from a value API that leave a column for the user to
|
|
5771
|
+
* complete) would otherwise import with the gap. A cell a sub-row tower
|
|
5772
|
+
* already reported in `reported` is not repeated.
|
|
5773
|
+
*/
|
|
5774
|
+
private _incompleteListRows;
|
|
5775
|
+
/**
|
|
5776
|
+
* The required, visible mSCOA columns whose settled account the picker would
|
|
5777
|
+
* refuse, each with its faults as the pre-processor's error keys
|
|
5778
|
+
* ({@link mscoaCompletenessFaults}): a segment without its account(s), or a
|
|
5779
|
+
* Dual input without a basis its cash-exclusion rules do not suppress.
|
|
5780
|
+
*
|
|
5781
|
+
* The live picker enforces this inside its component, which an import never
|
|
5782
|
+
* renders, and the tower's plain `required` validator passes any non-empty
|
|
5783
|
+
* account — so without this a required account imported with segments left
|
|
5784
|
+
* blank. An optional input is never checked, as in the form. Faults already
|
|
5785
|
+
* in `reported` (a code that was not found, a half-filled pair) are not
|
|
5786
|
+
* repeated.
|
|
5787
|
+
*/
|
|
5788
|
+
private _incompleteMscoaAccounts;
|
|
5789
|
+
/**
|
|
5790
|
+
* The settled values of a row with the imported values merged back into every
|
|
5791
|
+
* column the tower derives but the import may complete — the tower's value
|
|
5792
|
+
* favored, the import filling each gap it leaves ({@link _deepMergePreferTower}).
|
|
5793
|
+
*
|
|
5794
|
+
* Two kinds of column qualify:
|
|
5795
|
+
* - a value the author let the user complete ({@link mergesDerivedValue}: an
|
|
5796
|
+
* object or list fetched from an API, inherited from another input or
|
|
5797
|
+
* calculated, with *Allow the user to complete this value* on). The live
|
|
5798
|
+
* form folds such a value instead of replacing it, and the import's row
|
|
5799
|
+
* stands in for what the user would type: a column the source answers is
|
|
5800
|
+
* the source's, a column it leaves blank is the row's. The same rule is
|
|
5801
|
+
* applied at every level, so a list's sub-row completes its own inherited
|
|
5802
|
+
* or fetched values too ({@link _processMultipleInputItem});
|
|
5803
|
+
* - a MultipleInput carrying a value-API fetch or a calculation, whether or
|
|
5804
|
+
* not it is completable: its rows are user-authored source data that the
|
|
5805
|
+
* tower's value graph overrides, so the tower is favored but the rows fill
|
|
5806
|
+
* the gaps — and a tower value that resolves empty falls back to the rows.
|
|
5807
|
+
*
|
|
5808
|
+
* @param columns - The columns of the form (or the one-slide sub-row form).
|
|
5809
|
+
* @param imported - The pre-processed import row the tower was initialised from.
|
|
5810
|
+
* @param settled - The tower's settled values, keyed by `formControlName`.
|
|
5811
|
+
*/
|
|
5812
|
+
private _mergeImportedValues;
|
|
5813
|
+
/** Whether a column's imported value is merged with its tower-derived value — see {@link _mergeImportedValues}. */
|
|
5814
|
+
private _isMergedColumn;
|
|
4837
5815
|
/** True iff the column derives its value from a value-API fetch or a calculation. */
|
|
4838
5816
|
private _isValueDerivedColumn;
|
|
4839
5817
|
/**
|
|
4840
5818
|
* Deep-merges two values with the **override** (tower-derived) value favored
|
|
4841
|
-
* and the **base** (import) value filling every gap it leaves
|
|
5819
|
+
* and the **base** (import) value filling every gap it leaves — the import's
|
|
5820
|
+
* side of the fold a completable value gets in the live form.
|
|
4842
5821
|
*
|
|
4843
5822
|
* Rules (mirrors the import-merge contract):
|
|
4844
5823
|
* - `override` wins for scalars and for any key it defines.
|
|
4845
5824
|
* - Keys present only on `base` are preserved (import fills gaps).
|
|
4846
5825
|
* - Arrays merge **element-wise by index** (each element deep-merged), so a
|
|
4847
5826
|
* tower row that omits an import-only field keeps that field.
|
|
4848
|
-
* - An **empty** `override` array (or `null`/`undefined`) falls back entirely
|
|
4849
|
-
* to `base` — a tower value that resolves empty never erases the import rows
|
|
5827
|
+
* - An **empty** `override` array (or `null`/`undefined`/`''`) falls back entirely
|
|
5828
|
+
* to `base` — a tower value that resolves empty never erases the import rows,
|
|
5829
|
+
* and a cell the tower leaves blank for the user to complete takes the sheet's.
|
|
4850
5830
|
*/
|
|
4851
5831
|
private _deepMergePreferTower;
|
|
4852
5832
|
/**
|
|
@@ -4870,25 +5850,74 @@ declare class TFormImportController {
|
|
|
4870
5850
|
* it in a terminal status.
|
|
4871
5851
|
*/
|
|
4872
5852
|
private _runQueued;
|
|
5853
|
+
/**
|
|
5854
|
+
* {@link _runQueued} for a session that may combine duplicates
|
|
5855
|
+
* (`ImportIdentity.combine`): before each pass every group's combination is
|
|
5856
|
+
* planned from the rows as they stand, and a kept row last checked with
|
|
5857
|
+
* other numbers — its group has grown, shrunk, changed keeper or had a
|
|
5858
|
+
* member re-checked — is queued again. A group that only shows once its
|
|
5859
|
+
* rows have settled therefore costs its kept row one more check. Passes
|
|
5860
|
+
* repeat until nothing is queued; past {@link MAX_COMBINE_PASSES} a kept row
|
|
5861
|
+
* still out of date is failed instead of queued. A stopped run ends at once.
|
|
5862
|
+
* Without `combine` this is exactly one {@link _runQueued}.
|
|
5863
|
+
*/
|
|
5864
|
+
private _drain;
|
|
5865
|
+
/**
|
|
5866
|
+
* Plans each group keeper's combination from the rows as they stand, then
|
|
5867
|
+
* deals with every checked row standing on its own whose combination is not
|
|
5868
|
+
* the one it was checked with: queued again when `requeue`, else failed.
|
|
5869
|
+
*/
|
|
5870
|
+
private _planCombinations;
|
|
4873
5871
|
/** The lowest index of a row that is `pending` and has data to process, or -1. */
|
|
4874
5872
|
private _nextQueued;
|
|
4875
5873
|
/**
|
|
4876
5874
|
* The duplicate detection a session runs with, or `null` when `identity`
|
|
4877
|
-
* names no keys. Throws when a key
|
|
4878
|
-
*
|
|
4879
|
-
*
|
|
5875
|
+
* names no keys and folds no list. Throws when a key — for a dot-path key,
|
|
5876
|
+
* the field it starts at — or the field a `latest` keeper ranks by, is not
|
|
5877
|
+
* one of `columns`: a key that matched nothing would leave every row blank
|
|
5878
|
+
* there and make each a duplicate of the first — and a ranking field that
|
|
5879
|
+
* matched nothing would quietly keep the first — so the failure has to be
|
|
5880
|
+
* loud. A session with lists but no keys folds the lists and compares no
|
|
5881
|
+
* records; its `combine` is ignored, since no group exists to combine.
|
|
5882
|
+
*
|
|
5883
|
+
* @param columns The fields a key, a combined field or a list may name — the form's top-level columns, or a multiple-input's children.
|
|
5884
|
+
* @param listDepth The pre-processing depth those columns' lists are folded at — see {@link IdentitySession.listDepth}.
|
|
4880
5885
|
*/
|
|
4881
5886
|
private _identitySession;
|
|
4882
|
-
/**
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
5887
|
+
/**
|
|
5888
|
+
* `ImportIdentity.lists` as each list's fold rules, by list name. Throws for
|
|
5889
|
+
* a name that is not a MultipleInput among `columns`, and — read against
|
|
5890
|
+
* the list's children — for whatever {@link _identitySession} would throw
|
|
5891
|
+
* for: an unknown key or ranking child, or a combined child that is a key.
|
|
5892
|
+
* A list given no keys is left out, as nothing of it can repeat.
|
|
5893
|
+
*/
|
|
5894
|
+
private _listRules;
|
|
5895
|
+
/**
|
|
5896
|
+
* `ImportIdentity.combine` as field → op pairs, in field order. Throws for a
|
|
5897
|
+
* field that is not one of `columns`, a unique key (or the field a dot-path
|
|
5898
|
+
* key starts at), the field a `latest` keeper ranks by, an unknown op, or
|
|
5899
|
+
* an op that does not fit the field — `collect` gathers a list's rows and
|
|
5900
|
+
* nothing else, the other ops read a cell and never a list. Combining a
|
|
5901
|
+
* key would merge the very values that make rows one record, and combining
|
|
5902
|
+
* the ranking field would make the keeper rank itself.
|
|
5903
|
+
*/
|
|
5904
|
+
private _combineRules;
|
|
5905
|
+
/** The `formControlName`s of `columns` — a form's top-level columns, or a MultipleInput's children. */
|
|
5906
|
+
private _controlNames;
|
|
4886
5907
|
/**
|
|
4887
5908
|
* Records a row's own outcome and reports it — as a duplicate, if the
|
|
4888
5909
|
* session says so — in one emission, so no subscriber sees a verdict that
|
|
4889
5910
|
* is about to be overlaid.
|
|
4890
5911
|
*/
|
|
4891
5912
|
private _settleRow;
|
|
5913
|
+
/**
|
|
5914
|
+
* A checked row's outcome with the combination it was checked with: where
|
|
5915
|
+
* each combined value came from, and — when a row of its group held text
|
|
5916
|
+
* that is not a number in a combined field — that field's error, which
|
|
5917
|
+
* blocks the row like a pre-process error does. A row checked alone reports
|
|
5918
|
+
* no combination.
|
|
5919
|
+
*/
|
|
5920
|
+
private _withCombination;
|
|
4892
5921
|
/**
|
|
4893
5922
|
* Queues a row again with `row` as its data, its earlier outcome cleared,
|
|
4894
5923
|
* and re-evaluates which rows repeat which: the row may now repeat an
|
|
@@ -4903,13 +5932,20 @@ declare class TFormImportController {
|
|
|
4903
5932
|
*
|
|
4904
5933
|
* Each row's identities — raw, from `originalData`; settled, from
|
|
4905
5934
|
* `settledValue` once it has one — go through {@link assignDuplicates},
|
|
4906
|
-
* first wins
|
|
5935
|
+
* first wins unless `ImportIdentity.keep` or a {@link keepRow} choice says
|
|
5936
|
+
* otherwise. A row that repeats its group's keeper is reported as its
|
|
4907
5937
|
* duplicate: under `skip` with status `duplicate` and `isValid: false`,
|
|
4908
5938
|
* whatever it settled to kept; under `flag` with `duplicateOf` alone. A row
|
|
4909
5939
|
* that no longer repeats anything gets its own verdict back — or, never
|
|
4910
5940
|
* having been processed, returns to the queue as `pending`.
|
|
4911
5941
|
*/
|
|
4912
5942
|
private _reconcile;
|
|
5943
|
+
/**
|
|
5944
|
+
* Each row's identities over the session's keys: raw from `originalData`,
|
|
5945
|
+
* settled from `settledValue`. Under a `latest` keeper, also the row's rank:
|
|
5946
|
+
* its settled value of the field once it has one, else its sheet cell.
|
|
5947
|
+
*/
|
|
5948
|
+
private _rowIdentities;
|
|
4913
5949
|
/** One row as it is to be reported, given the row it repeats (`original`), if any. */
|
|
4914
5950
|
private _reportRow;
|
|
4915
5951
|
/**
|
|
@@ -4927,6 +5963,1302 @@ declare class TFormImportController {
|
|
|
4927
5963
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TFormImportController>;
|
|
4928
5964
|
}
|
|
4929
5965
|
|
|
5966
|
+
/**
|
|
5967
|
+
* @file Combining a duplicate group's cells into the row it keeps.
|
|
5968
|
+
*
|
|
5969
|
+
* A session given `ImportIdentity.combine` imports one row per group of
|
|
5970
|
+
* duplicates as before, but takes the named fields from the whole group:
|
|
5971
|
+
* numbers are summed, averaged, or the lowest / highest taken; texts are
|
|
5972
|
+
* joined, every distinct value once, the way a multi-select cell is written;
|
|
5973
|
+
* the rows of a list field's lists are gathered into one list. The outcome is
|
|
5974
|
+
* written into the kept row's cells BEFORE its tower is built — so the form's
|
|
5975
|
+
* calculations derive from the combined value and its validators judge it,
|
|
5976
|
+
* exactly as if the user had typed it.
|
|
5977
|
+
*
|
|
5978
|
+
* Cells are read as the sheet gave them. A blank one is left out; a cell the
|
|
5979
|
+
* op cannot read is never guessed at — it is reported, so the kept row cannot
|
|
5980
|
+
* import a total that silently skipped a line.
|
|
5981
|
+
*
|
|
5982
|
+
* Arithmetic runs on scaled integers at the precision of the most precise
|
|
5983
|
+
* value, so `0.1 + 0.2` combines to `0.3`.
|
|
5984
|
+
*
|
|
5985
|
+
* Angular-free, so it can be tested directly.
|
|
5986
|
+
*/
|
|
5987
|
+
|
|
5988
|
+
/**
|
|
5989
|
+
* A cell as values to join: the texts it holds, `null` when it is blank, or
|
|
5990
|
+
* `undefined` when it holds something that is not text.
|
|
5991
|
+
*
|
|
5992
|
+
* Text is split as a multi-select cell is ({@link parseMultiSelectValues}: a
|
|
5993
|
+
* comma-separated or JSON list, else the one value); a list of primitives is
|
|
5994
|
+
* each of its members; a number or boolean is its text. `null`, `undefined`,
|
|
5995
|
+
* whitespace and an empty list are blank. An object, a date or a list holding
|
|
5996
|
+
* one is not text.
|
|
5997
|
+
*/
|
|
5998
|
+
declare function joinableTexts(cell: unknown): string[] | null | undefined;
|
|
5999
|
+
/**
|
|
6000
|
+
* A cell as the rows of a list to gather: its rows, `null` when it is blank —
|
|
6001
|
+
* nothing, blank text or an empty list — or `undefined` when it holds
|
|
6002
|
+
* something that is not a list of rows. Text is read as the JSON list it
|
|
6003
|
+
* encodes, the way the import reads a list cell.
|
|
6004
|
+
*/
|
|
6005
|
+
declare function collectableRows(cell: unknown): Record<string, unknown>[] | null | undefined;
|
|
6006
|
+
|
|
6007
|
+
/**
|
|
6008
|
+
* Guesses the 1-based header row of a sheet: the first row within the first 20
|
|
6009
|
+
* that has at least `max(2, ⌈0.5 × widest row⌉)` non-blank cells, all distinct
|
|
6010
|
+
* and mostly non-numeric, followed by a non-blank row. Falls back to 1.
|
|
6011
|
+
*
|
|
6012
|
+
* @param sheet The sheet as a grid of cell texts.
|
|
6013
|
+
*/
|
|
6014
|
+
declare function guessHeaderRow(sheet: SourceSheet): number;
|
|
6015
|
+
/**
|
|
6016
|
+
* Reads `sheet` under `headerRow`: headers from that row (blank ones named
|
|
6017
|
+
* `Column <letter>`, repeats suffixed ` (2)`, ` (3)`…), one {@link SourceRow}
|
|
6018
|
+
* per non-blank row below it, each with a fresh id from `mintId`.
|
|
6019
|
+
*
|
|
6020
|
+
* @param sheet The sheet as a grid of cell texts.
|
|
6021
|
+
* @param headerRow 1-based header row.
|
|
6022
|
+
* @param mintId Makes a row id; a UUID v4 by default. Specs pass a counter.
|
|
6023
|
+
*/
|
|
6024
|
+
declare function toSourceTable(sheet: SourceSheet, headerRow: number, mintId?: () => string): SourceTable;
|
|
6025
|
+
|
|
6026
|
+
/**
|
|
6027
|
+
* @file Deciding what an uploaded file is: the import template — which goes
|
|
6028
|
+
* through today's import untouched — or a file that needs mapping first.
|
|
6029
|
+
*
|
|
6030
|
+
* Angular-free, so a host can call it anywhere.
|
|
6031
|
+
*/
|
|
6032
|
+
|
|
6033
|
+
/** What {@link detectSource} needs besides the file and the form. */
|
|
6034
|
+
interface DetectSourceContext {
|
|
6035
|
+
/** The workflow the import is for; a suggested recipe is made for it. */
|
|
6036
|
+
readonly workflowId: string;
|
|
6037
|
+
/** The workflow's saved recipes, to offer the ones that fit the file. */
|
|
6038
|
+
readonly saved: readonly ImportRecipe[];
|
|
6039
|
+
/** Option lists loaded for the form, used to match choice columns by their values. */
|
|
6040
|
+
readonly options?: ImportOptionLists;
|
|
6041
|
+
/**
|
|
6042
|
+
* True when the user chose to map a template-shaped file like any other
|
|
6043
|
+
* spreadsheet: the template check is skipped, so the verdict is
|
|
6044
|
+
* `near-template` or `own` and carries the saved recipes that fit.
|
|
6045
|
+
*/
|
|
6046
|
+
readonly asSpreadsheet?: boolean;
|
|
6047
|
+
}
|
|
6048
|
+
/**
|
|
6049
|
+
* Classifies an uploaded file.
|
|
6050
|
+
*
|
|
6051
|
+
* `template` — unless {@link DetectSourceContext.asSpreadsheet} — when any of
|
|
6052
|
+
* these holds; the `Guide` and `Options` sheets are ignored throughout:
|
|
6053
|
+
*
|
|
6054
|
+
* 1. the workbook has a sheet named `main` (in the grids or the parsed rows):
|
|
6055
|
+
* both the built template and the host's own export write one;
|
|
6056
|
+
* 2. any sheet's header row (row 1 of its grid, else its parsed keys) has a
|
|
6057
|
+
* `$index` column, which only a detail sheet of the template carries;
|
|
6058
|
+
* 3. with neither, its single data sheet's non-blank headers are all known —
|
|
6059
|
+
* a column key, an alias, `$index` or `$sheetBound`, compared
|
|
6060
|
+
* case-insensitively — and at least one is a column key exactly.
|
|
6061
|
+
*
|
|
6062
|
+
* Extra or missing columns on a `main` sheet do not change the verdict, so
|
|
6063
|
+
* anything today's import accepted still takes today's path and reports what
|
|
6064
|
+
* it always has.
|
|
6065
|
+
*
|
|
6066
|
+
* Otherwise the first sheet is read under its guessed header row and a recipe
|
|
6067
|
+
* suggested for it: `near-template` when the suggestion fills at least 80% of
|
|
6068
|
+
* the required columns by key, label or alias alone, else `own`. `score` is
|
|
6069
|
+
* the share of required columns the suggestion fills. Either way `saved` lists
|
|
6070
|
+
* the recipes whose header signature has a Jaccard similarity of at least 0.9
|
|
6071
|
+
* with the file's headers, each with its {@link checkRecipe} result.
|
|
6072
|
+
*
|
|
6073
|
+
* @param parsed The workbook as header-keyed rows per sheet — today's parse.
|
|
6074
|
+
* @param source The same workbook as grids.
|
|
6075
|
+
* @param form The form being imported into.
|
|
6076
|
+
* @param ctx The workflow, its saved recipes and the loaded option lists.
|
|
6077
|
+
*/
|
|
6078
|
+
declare function detectSource(parsed: Readonly<Record<string, readonly unknown[]>>, source: readonly SourceSheet[], form: Pick<FormInterface, 'slides'>, ctx: DetectSourceContext): SourceVerdict;
|
|
6079
|
+
|
|
6080
|
+
/**
|
|
6081
|
+
* Suggests a recipe for `table`. Each import column of the main sheet is
|
|
6082
|
+
* matched to a source column, in this order, each source column claimed at
|
|
6083
|
+
* most once:
|
|
6084
|
+
*
|
|
6085
|
+
* 1. the header equals the column key;
|
|
6086
|
+
* 2. the header equals the column's label or an alias (normalised);
|
|
6087
|
+
* 3. word-token Jaccard similarity of header and label of at least 0.6;
|
|
6088
|
+
* 4. for a choice column, a source column where at least 70% of a 50-value
|
|
6089
|
+
* sample resolves to one of its options.
|
|
6090
|
+
*
|
|
6091
|
+
* The result is unsaved: a fresh `id`, an empty `name`, `revision` 0, empty
|
|
6092
|
+
* `choices`, and a `source` whose `headerSignature` is the table's headers,
|
|
6093
|
+
* normalised.
|
|
6094
|
+
*
|
|
6095
|
+
* @param table The source table.
|
|
6096
|
+
* @param form The form being imported into.
|
|
6097
|
+
* @param workflowId The workflow the recipe is for.
|
|
6098
|
+
* @param options Option lists loaded for the form, for step 4.
|
|
6099
|
+
*/
|
|
6100
|
+
declare function suggestRecipe(table: SourceTable, form: Pick<FormInterface, 'slides'>, workflowId: string, options?: ImportOptionLists): ImportRecipe;
|
|
6101
|
+
/**
|
|
6102
|
+
* {@link suggestRecipe} for the rows of ONE multiple-input field: each of the
|
|
6103
|
+
* field's children is matched to a source column by the same four steps, and
|
|
6104
|
+
* the recipe's keys are the children's `formControlName`s — the shape
|
|
6105
|
+
* `TFormImportController.runMultipleInputImport` reads. A child that is
|
|
6106
|
+
* itself a list takes a JSON array, as the field's template does.
|
|
6107
|
+
*
|
|
6108
|
+
* @param table The source table.
|
|
6109
|
+
* @param input The MultipleInput column whose `formInputs` define a row.
|
|
6110
|
+
* @param scope What the recipe is for — `fieldRecipeScope(input)` — stored as its `workflowId`.
|
|
6111
|
+
* @param options Option lists loaded for the children (`loadMultipleInputOptions`), for step 4.
|
|
6112
|
+
*/
|
|
6113
|
+
declare function suggestFieldRecipe(table: SourceTable, input: Pick<FormColumnInputs, 'id' | 'formInputs'>, scope: string, options?: ImportOptionLists): ImportRecipe;
|
|
6114
|
+
|
|
6115
|
+
/**
|
|
6116
|
+
* @file The distinct values a column source yields over a table — what the
|
|
6117
|
+
* choice mapper lists for the user to map.
|
|
6118
|
+
*
|
|
6119
|
+
* Angular-free, so a host can call it anywhere.
|
|
6120
|
+
*/
|
|
6121
|
+
|
|
6122
|
+
/** One distinct value of a column source. */
|
|
6123
|
+
interface DistinctValue {
|
|
6124
|
+
/** The text as first seen, after transforms. */
|
|
6125
|
+
readonly text: string;
|
|
6126
|
+
/** Its comparison key (`normaliseOptionText`) — what a `ValueMapEntry.sourceText` holds. */
|
|
6127
|
+
readonly normalised: string;
|
|
6128
|
+
/** How many rows yield it. */
|
|
6129
|
+
readonly rows: number;
|
|
6130
|
+
}
|
|
6131
|
+
/**
|
|
6132
|
+
* The distinct non-blank values `source` yields over the rows of `table`,
|
|
6133
|
+
* grouped by their comparison key, most frequent first (ties in first-seen
|
|
6134
|
+
* order). A `constant` or `skip` source yields at most one value.
|
|
6135
|
+
*
|
|
6136
|
+
* @param table The source table.
|
|
6137
|
+
* @param source Where the column's cell comes from.
|
|
6138
|
+
*/
|
|
6139
|
+
declare function distinctValues(table: SourceTable, source: ColumnSource): readonly DistinctValue[];
|
|
6140
|
+
|
|
6141
|
+
/**
|
|
6142
|
+
* @file The text a column source yields for one source row — shared by
|
|
6143
|
+
* applying a recipe and listing a column's distinct values, so the mapper
|
|
6144
|
+
* shows exactly what the import will receive.
|
|
6145
|
+
*
|
|
6146
|
+
* Angular-free, so a host can call it anywhere.
|
|
6147
|
+
*/
|
|
6148
|
+
|
|
6149
|
+
/**
|
|
6150
|
+
* The text `source` yields for `row`: a column's cell after its transforms, a
|
|
6151
|
+
* constant, the non-blank cells of several columns joined, one of a random
|
|
6152
|
+
* source's values, or `''` for `skip`. A column the row lacks reads as blank.
|
|
6153
|
+
*
|
|
6154
|
+
* @param source Where the cell comes from.
|
|
6155
|
+
* @param row The source row.
|
|
6156
|
+
*/
|
|
6157
|
+
declare function columnCellText(source: ColumnSource, row: SourceRow): string;
|
|
6158
|
+
|
|
6159
|
+
/**
|
|
6160
|
+
* @file The choice ladder: how a recipe settles a source text to one option
|
|
6161
|
+
* of a choice column, or leaves it for the import's own resolver.
|
|
6162
|
+
*
|
|
6163
|
+
* Angular-free, so a host can call it anywhere.
|
|
6164
|
+
*/
|
|
6165
|
+
|
|
6166
|
+
/**
|
|
6167
|
+
* Settles one source text against `column`'s loaded options. The first step
|
|
6168
|
+
* that leaves exactly one option wins:
|
|
6169
|
+
*
|
|
6170
|
+
* 1. a `valueMap` entry for the text whose `context` (if any) holds on `row`
|
|
6171
|
+
* → `map`;
|
|
6172
|
+
* 2. the options the text names that also satisfy every `narrow` rule → `unique`
|
|
6173
|
+
* when one (`rule` when the text alone named several). With `matchOn`, only
|
|
6174
|
+
* that attribute names an option. Without it, a stored `value` names its
|
|
6175
|
+
* option outright, else the label (`text`) does — never an attribute, so a
|
|
6176
|
+
* `"true"` or `"2"` is not settled through members like `active` or
|
|
6177
|
+
* `sortOrder`. The narrowing columns are considered together with the
|
|
6178
|
+
* text: an option the text names but a narrowing column disagrees with is
|
|
6179
|
+
* no match;
|
|
6180
|
+
* 3. those filtered by each option's `when` conditions whose input is in
|
|
6181
|
+
* `mapped` → `rule` when one.
|
|
6182
|
+
*
|
|
6183
|
+
* Attributes are read only through `matchOn` and `narrow`. A text step 2
|
|
6184
|
+
* cannot settle reaches the import's own resolver unchanged.
|
|
6185
|
+
*
|
|
6186
|
+
* One option gives `{ kind: 'value', cell: <its stored value text> }`. Zero
|
|
6187
|
+
* or several give `{ kind: 'pass-through', cell: text }` with reason
|
|
6188
|
+
* `unmatched` or `tied` — or `partial` when the list is partial and nothing
|
|
6189
|
+
* matched — so the import's resolver and per-row picker see the text exactly
|
|
6190
|
+
* as they would have. Comparisons use `normaliseOptionText`.
|
|
6191
|
+
*
|
|
6192
|
+
* Single values only: a multi-select cell is passed through as it is.
|
|
6193
|
+
*
|
|
6194
|
+
* @param text The source text, after transforms.
|
|
6195
|
+
* @param row The source row, for `narrow` columns and `valueMap` contexts.
|
|
6196
|
+
* @param rule The recipe's rule for the column, if any.
|
|
6197
|
+
* @param column The import column, with its loaded `options`.
|
|
6198
|
+
* @param mapped Input id → the text the recipe produced for that input on this
|
|
6199
|
+
* row, for `when` narrowing.
|
|
6200
|
+
*/
|
|
6201
|
+
declare function resolveChoice(text: string, row: SourceRow, rule: ChoiceRule | undefined, column: ImportColumn, mapped: ReadonlyMap<string, string>): ChoiceOutcome;
|
|
6202
|
+
|
|
6203
|
+
/**
|
|
6204
|
+
* Maps `table` through `recipe`.
|
|
6205
|
+
*
|
|
6206
|
+
* Rows failing the `rowRules` are left out (counted in `filteredOut`). Each
|
|
6207
|
+
* import column the recipe maps gets its cell from its `ColumnSource`; a
|
|
6208
|
+
* choice column's cell goes through `resolveChoice`. With `grouping`, rows
|
|
6209
|
+
* sharing the `by` values become one record whose `detailTarget` holds one
|
|
6210
|
+
* sub-row per source row, each sub-row's `id` being its source row id, and the
|
|
6211
|
+
* record's main columns are combined per `aggregate`. Every record carries
|
|
6212
|
+
* `SOURCE_ROWS_KEY`: the ids of the source rows it was built from. A record
|
|
6213
|
+
* or sub-row whose choice cell the ladder left to the import, under a rule
|
|
6214
|
+
* with `matchOn` or `narrow`, carries `OPTION_MATCH_KEY` with the row's
|
|
6215
|
+
* criteria for that cell, so the import matches the options it loads for the
|
|
6216
|
+
* row on every mapped column too.
|
|
6217
|
+
*
|
|
6218
|
+
* @param table The source table.
|
|
6219
|
+
* @param recipe The recipe.
|
|
6220
|
+
* @param form The form being imported into.
|
|
6221
|
+
* @param options Option lists loaded for the form; without them choice cells pass through.
|
|
6222
|
+
*/
|
|
6223
|
+
declare function applyRecipe(table: SourceTable, recipe: ImportRecipe, form: Pick<FormInterface, 'slides'>, options?: ImportOptionLists): MappedImport;
|
|
6224
|
+
/**
|
|
6225
|
+
* {@link applyRecipe} for the rows of ONE multiple-input field: one row per
|
|
6226
|
+
* source row the `rowRules` keep, keyed by the children's `formControlName`s —
|
|
6227
|
+
* the shape `TFormImportController.runMultipleInputImport` reads. A choice
|
|
6228
|
+
* child's cell goes through `resolveChoice` exactly as a form's does, a
|
|
6229
|
+
* dependent list narrowed by what its parent child settled to. A recipe's
|
|
6230
|
+
* `grouping` is ignored: the field's rows are already the list. Every row
|
|
6231
|
+
* carries `SOURCE_ROWS_KEY` with its one source row id.
|
|
6232
|
+
*
|
|
6233
|
+
* @param table The source table.
|
|
6234
|
+
* @param recipe The recipe, keyed by child `formControlName`.
|
|
6235
|
+
* @param input The MultipleInput column whose `formInputs` define a row.
|
|
6236
|
+
* @param options Option lists loaded for the children; without them choice cells pass through.
|
|
6237
|
+
*/
|
|
6238
|
+
declare function applyFieldRecipe(table: SourceTable, recipe: ImportRecipe, input: Pick<FormColumnInputs, 'id' | 'formInputs'>, options?: ImportOptionLists): MappedImport;
|
|
6239
|
+
|
|
6240
|
+
/**
|
|
6241
|
+
* @file Checking a saved recipe for references that no longer hold — a
|
|
6242
|
+
* removed field, a new required one, a column the file lacks, an option no
|
|
6243
|
+
* longer offered.
|
|
6244
|
+
*
|
|
6245
|
+
* Angular-free, so a host can call it anywhere.
|
|
6246
|
+
*/
|
|
6247
|
+
|
|
6248
|
+
/** What {@link checkRecipe} checks a recipe against. */
|
|
6249
|
+
interface CheckRecipeContext {
|
|
6250
|
+
/** The form as it is now. */
|
|
6251
|
+
readonly form: Pick<FormInterface, 'slides'>;
|
|
6252
|
+
/** The file the recipe is about to read; without it source columns are not checked. */
|
|
6253
|
+
readonly table?: SourceTable;
|
|
6254
|
+
/** Option lists loaded for the form; without them only the options a definition carries are checked. */
|
|
6255
|
+
readonly options?: ImportOptionLists;
|
|
6256
|
+
}
|
|
6257
|
+
/**
|
|
6258
|
+
* Lists every broken reference of `recipe`, blocking issues first. `ok` is
|
|
6259
|
+
* `true` when none is blocking. Issue kinds and whether each blocks:
|
|
6260
|
+
*
|
|
6261
|
+
* - `targetMissing` — a mapped key is gone from the form or no longer
|
|
6262
|
+
* importable. Not blocking.
|
|
6263
|
+
* - `requiredUnmapped` — a required column the recipe does not fill. Blocking.
|
|
6264
|
+
* - `sourceColumnMissing` — a referenced source column is not in the table's
|
|
6265
|
+
* headers. Blocking when it feeds a required column.
|
|
6266
|
+
* - `optionMissing` — a `valueMap` answer's option is not in a complete list.
|
|
6267
|
+
* Not blocking.
|
|
6268
|
+
* - `optionUnverifiable` — the same against a partial list. Not blocking.
|
|
6269
|
+
* - `attributeMissing` — a `matchOn` / `narrow` attribute no option carries.
|
|
6270
|
+
* Blocking.
|
|
6271
|
+
* - `groupingInvalid` — `detailTarget` is not a MultipleInput of the form.
|
|
6272
|
+
* Blocking.
|
|
6273
|
+
* - `schemaNewer` — `schemaVersion` is newer than this library knows.
|
|
6274
|
+
* Blocking; nothing else is checked.
|
|
6275
|
+
*
|
|
6276
|
+
* @param recipe The recipe.
|
|
6277
|
+
* @param ctx The form, and optionally the file and the loaded option lists.
|
|
6278
|
+
*/
|
|
6279
|
+
declare function checkRecipe(recipe: ImportRecipe, ctx: CheckRecipeContext): RecipeCheck;
|
|
6280
|
+
/** What {@link checkFieldRecipe} checks a recipe against. */
|
|
6281
|
+
interface CheckFieldRecipeContext {
|
|
6282
|
+
/** The MultipleInput column as it is now; its `formInputs` define a row. */
|
|
6283
|
+
readonly input: Pick<FormColumnInputs, 'id' | 'formInputs'>;
|
|
6284
|
+
/** The file the recipe is about to read; without it source columns are not checked. */
|
|
6285
|
+
readonly table?: SourceTable;
|
|
6286
|
+
/** Option lists loaded for the children; without them only the options a definition carries are checked. */
|
|
6287
|
+
readonly options?: ImportOptionLists;
|
|
6288
|
+
}
|
|
6289
|
+
/**
|
|
6290
|
+
* {@link checkRecipe} for a recipe that fills the rows of ONE multiple-input
|
|
6291
|
+
* field — keyed by the children's `formControlName`s, as
|
|
6292
|
+
* `suggestFieldRecipe` makes it. The same issues are reported the same way;
|
|
6293
|
+
* a `grouping` is `groupingInvalid`, since the field's rows are already the list.
|
|
6294
|
+
*
|
|
6295
|
+
* @param recipe The recipe.
|
|
6296
|
+
* @param ctx The field, and optionally the file and the loaded option lists.
|
|
6297
|
+
*/
|
|
6298
|
+
declare function checkFieldRecipe(recipe: ImportRecipe, ctx: CheckFieldRecipeContext): RecipeCheck;
|
|
6299
|
+
|
|
6300
|
+
/**
|
|
6301
|
+
* @file The typed text transforms a recipe may apply to a source cell. Each
|
|
6302
|
+
* step is data with a fixed meaning; nothing is evaluated.
|
|
6303
|
+
*
|
|
6304
|
+
* Angular-free, so a host can call it anywhere.
|
|
6305
|
+
*/
|
|
6306
|
+
|
|
6307
|
+
/**
|
|
6308
|
+
* Applies `steps` to `text` in order. A step that cannot apply — a date that
|
|
6309
|
+
* does not parse, a number that is not one — leaves the text as it was, so
|
|
6310
|
+
* validation reports the cell rather than the mapping hiding it. Dates come
|
|
6311
|
+
* out as `yyyy-mm-dd`; numbers as plain decimal text.
|
|
6312
|
+
*
|
|
6313
|
+
* @param text The cell text.
|
|
6314
|
+
* @param steps The steps; absent or empty returns `text`.
|
|
6315
|
+
*/
|
|
6316
|
+
declare function applyTransforms(text: string, steps: readonly TransformStep[] | undefined): string;
|
|
6317
|
+
|
|
6318
|
+
/**
|
|
6319
|
+
* @file The typed row rules a recipe may filter source rows with. Their words
|
|
6320
|
+
* follow `docs/array-transform-rules.md`; nothing is evaluated.
|
|
6321
|
+
*
|
|
6322
|
+
* Angular-free, so a host can call it anywhere.
|
|
6323
|
+
*/
|
|
6324
|
+
|
|
6325
|
+
/** One rule of a group, with its place in the recipe's flat `rowRules`. */
|
|
6326
|
+
interface RowRuleAt {
|
|
6327
|
+
/** The rule. */
|
|
6328
|
+
readonly rule: RowRule;
|
|
6329
|
+
/** Its index in `rowRules`. */
|
|
6330
|
+
readonly index: number;
|
|
6331
|
+
}
|
|
6332
|
+
/**
|
|
6333
|
+
* The rules as the groups they read as: a rule joined by `or` starts a new
|
|
6334
|
+
* group, any other joins the group before it. A row is kept when every rule
|
|
6335
|
+
* of any one group holds — `and` binds tighter than `or`, as `&&` does `||`.
|
|
6336
|
+
*
|
|
6337
|
+
* @param rules The recipe's rules, in order.
|
|
6338
|
+
*/
|
|
6339
|
+
declare function rowRuleGroups(rules: readonly RowRule[] | undefined): RowRuleAt[][];
|
|
6340
|
+
/**
|
|
6341
|
+
* Whether `row` passes the rules: every rule of at least one group (see
|
|
6342
|
+
* {@link rowRuleGroups}) holds. Text comparisons use `normaliseOptionText`;
|
|
6343
|
+
* `gt` / `lt` compare numbers and fail when either side is not one. A rule on
|
|
6344
|
+
* a column the row lacks reads it as blank.
|
|
6345
|
+
*
|
|
6346
|
+
* @param row The source row.
|
|
6347
|
+
* @param rules The rules; absent or empty matches every row.
|
|
6348
|
+
*/
|
|
6349
|
+
declare function matchesRowRules(row: SourceRow, rules: readonly RowRule[] | undefined): boolean;
|
|
6350
|
+
/**
|
|
6351
|
+
* Whether `row` passes one rule on its own — for a host that counts what each
|
|
6352
|
+
* rule or group keeps.
|
|
6353
|
+
*
|
|
6354
|
+
* @param row The source row.
|
|
6355
|
+
* @param rule The rule.
|
|
6356
|
+
*/
|
|
6357
|
+
declare function matchesRowRule(row: SourceRow, rule: RowRule): boolean;
|
|
6358
|
+
|
|
6359
|
+
/**
|
|
6360
|
+
* @file The import settings a recipe carries (`ImportRecipe.settings`).
|
|
6361
|
+
*
|
|
6362
|
+
* Angular-free, so a host can call it anywhere.
|
|
6363
|
+
*/
|
|
6364
|
+
|
|
6365
|
+
/**
|
|
6366
|
+
* `recipe` carrying `settings` in place of its own; `undefined` drops them, so
|
|
6367
|
+
* a mapping with the import's defaults is stored without a `settings` member.
|
|
6368
|
+
*
|
|
6369
|
+
* @param recipe The recipe.
|
|
6370
|
+
* @param settings The settings to save with it.
|
|
6371
|
+
*/
|
|
6372
|
+
declare function withRecipeSettings(recipe: ImportRecipe, settings: ImportRecipeSettings | undefined): ImportRecipe;
|
|
6373
|
+
/**
|
|
6374
|
+
* The settings for an identity and an API-cache choice, or `undefined` when
|
|
6375
|
+
* both are the import's defaults: no keys beyond `defaultKeys`, the first row
|
|
6376
|
+
* kept, nothing combined, no list folded, and calls not shared.
|
|
6377
|
+
*
|
|
6378
|
+
* @param identity The run's identity as the user set it.
|
|
6379
|
+
* @param apiCache Whether identical API calls are shared; `undefined` where the host has no such choice.
|
|
6380
|
+
* @param defaultKeys Keys the import always uses (a workflow's own) — they alone do not make a setting.
|
|
6381
|
+
*/
|
|
6382
|
+
declare function recipeSettingsOf(identity: ImportIdentity | undefined, apiCache?: boolean, defaultKeys?: readonly string[]): ImportRecipeSettings | undefined;
|
|
6383
|
+
|
|
6384
|
+
/**
|
|
6385
|
+
* @file Recipes for the rows of ONE multiple-input field: what they are saved
|
|
6386
|
+
* under, and which saved ones fit an uploaded file.
|
|
6387
|
+
*
|
|
6388
|
+
* Angular-free, so a host can call it anywhere.
|
|
6389
|
+
*/
|
|
6390
|
+
|
|
6391
|
+
/**
|
|
6392
|
+
* The scope a field's recipes are saved under, `field:<input id>`, and the
|
|
6393
|
+
* `workflowId` such a recipe carries. Input ids are stable for the life of a
|
|
6394
|
+
* form definition, so a mapping saved for a field is offered on that field
|
|
6395
|
+
* wherever the form is used.
|
|
6396
|
+
*
|
|
6397
|
+
* @param input The MultipleInput column.
|
|
6398
|
+
*/
|
|
6399
|
+
declare function fieldRecipeScope(input: Pick<FormColumnInputs, 'id'>): string;
|
|
6400
|
+
/**
|
|
6401
|
+
* The saved recipes of a field whose header signature resembles the file's,
|
|
6402
|
+
* most similar first, each read under its own sheet and header row and
|
|
6403
|
+
* checked against that table with {@link checkFieldRecipe}.
|
|
6404
|
+
*
|
|
6405
|
+
* @param sheets The file's sheets as grids.
|
|
6406
|
+
* @param fallback The table the file is read as now — used for a recipe whose sheet the file lacks.
|
|
6407
|
+
* @param saved The field's saved recipes.
|
|
6408
|
+
* @param input The MultipleInput column.
|
|
6409
|
+
* @param options Option lists loaded for the children.
|
|
6410
|
+
*/
|
|
6411
|
+
declare function matchSavedFieldRecipes(sheets: readonly SourceSheet[], fallback: SourceTable, saved: readonly ImportRecipe[], input: Pick<FormColumnInputs, 'id' | 'formInputs'>, options?: ImportOptionLists): SavedRecipeMatch[];
|
|
6412
|
+
|
|
6413
|
+
/** One choice in the "Unique transaction keys" picker. */
|
|
6414
|
+
interface UniqueKeyOption {
|
|
6415
|
+
label: string;
|
|
6416
|
+
/** What is stored in `uniqueKeys`: a control name, or a dot path below one. */
|
|
6417
|
+
value: string;
|
|
6418
|
+
}
|
|
6419
|
+
/**
|
|
6420
|
+
* The account field a unique key compares on. `SCOAid` is the account's GUID —
|
|
6421
|
+
* the one field every stored account carries (the legacy picker's `IScoaAccount`
|
|
6422
|
+
* and the account browser's `MscoaStoredAccount` alike) that identifies it on its
|
|
6423
|
+
* own. The display fields (`SCOAAccount`, `ShortDescription`) are not unique, and
|
|
6424
|
+
* comparing the whole account object would also compare its version stamp and
|
|
6425
|
+
* schedule mappings.
|
|
6426
|
+
*/
|
|
6427
|
+
declare const MSCOA_UNIQUE_ACCOUNT_FIELD = "SCOAid";
|
|
6428
|
+
/**
|
|
6429
|
+
* The options the unique-keys picker offers for a pool of form inputs.
|
|
6430
|
+
*
|
|
6431
|
+
* A primitive field is offered as itself (`requisitionNumber`). An mSCOA input
|
|
6432
|
+
* holds an object, so instead of one option for the whole value it is expanded
|
|
6433
|
+
* into one option per account column it can capture, each a dot path down to
|
|
6434
|
+
* that account's {@link MSCOA_UNIQUE_ACCOUNT_FIELD}, plus one per custom input:
|
|
6435
|
+
*
|
|
6436
|
+
* - `<control>.<basis>.<SEGMENT>.debit.SCOAid` / `.credit.SCOAid`
|
|
6437
|
+
* - `<control>.<basis>.<SEGMENT>.<ext>Debit.SCOAid` / `<ext>Credit.SCOAid` for an
|
|
6438
|
+
* additional-account column the segment enables
|
|
6439
|
+
* - `<control>.<customInput>` for each of the input's custom inputs
|
|
6440
|
+
*
|
|
6441
|
+
* The engine reads every key along the same path Mongo resolves `form.<key>`
|
|
6442
|
+
* with, so each option is compared on its own and several can be combined into
|
|
6443
|
+
* one compound key.
|
|
6444
|
+
*
|
|
6445
|
+
* De-duplicated by value, first label wins — the same field can appear on
|
|
6446
|
+
* several steps.
|
|
6447
|
+
*/
|
|
6448
|
+
declare function buildUniqueKeyOptions(inputs: readonly FormColumnInputs[] | null | undefined): UniqueKeyOption[];
|
|
6449
|
+
|
|
6450
|
+
/**
|
|
6451
|
+
* @file The column check the import's "Match columns" step runs on every file
|
|
6452
|
+
* before any row is checked: which column of the file goes to which field,
|
|
6453
|
+
* which are deliberately left out, and what still needs the user.
|
|
6454
|
+
*
|
|
6455
|
+
* Two kinds of file are matched differently:
|
|
6456
|
+
*
|
|
6457
|
+
* - **The iServe template** keeps its own shape — a `main` sheet plus one
|
|
6458
|
+
* sheet per list — so its columns are only *renamed* onto field keys (one
|
|
6459
|
+
* column may be copied onto several) ({@link templateReport},
|
|
6460
|
+
* {@link applyTemplateMatches}) and every sheet
|
|
6461
|
+
* still goes through `consolidateSheets`. A column that already carries a
|
|
6462
|
+
* field's key, label or alias is matched on its own.
|
|
6463
|
+
* - **Any other spreadsheet** is read through an import recipe
|
|
6464
|
+
* ({@link recipeReport}); a column is matched when the recipe reads it.
|
|
6465
|
+
*
|
|
6466
|
+
* The step may only be left once the report is {@link MatchReport.complete}:
|
|
6467
|
+
* every required field has a column (or a fixed value) and nothing blocks.
|
|
6468
|
+
* That is 100%: a column connected to no field is simply not imported.
|
|
6469
|
+
*
|
|
6470
|
+
* Angular-free, so it can be tested directly.
|
|
6471
|
+
*/
|
|
6472
|
+
|
|
6473
|
+
/**
|
|
6474
|
+
* What the user chose for one column of a template file, over the automatic
|
|
6475
|
+
* match. A column may fill several fields (`keys`); a field still takes one column.
|
|
6476
|
+
*/
|
|
6477
|
+
type ColumnChoice = {
|
|
6478
|
+
readonly kind: 'field';
|
|
6479
|
+
readonly keys: readonly string[];
|
|
6480
|
+
} | {
|
|
6481
|
+
readonly kind: 'skip';
|
|
6482
|
+
} | {
|
|
6483
|
+
readonly kind: 'none';
|
|
6484
|
+
};
|
|
6485
|
+
/** Sheet name → column header → the user's choice. */
|
|
6486
|
+
type TemplateChoices = Readonly<Record<string, Readonly<Record<string, ColumnChoice>>>>;
|
|
6487
|
+
/** One column of the file, as the check sees it. */
|
|
6488
|
+
interface MatchColumn {
|
|
6489
|
+
/** Unique within the report. */
|
|
6490
|
+
readonly id: string;
|
|
6491
|
+
/** The sheet the column is on. */
|
|
6492
|
+
readonly sheet: string;
|
|
6493
|
+
/** The column's header text. */
|
|
6494
|
+
readonly header: string;
|
|
6495
|
+
/** Up to three of its values, to tell columns apart. */
|
|
6496
|
+
readonly samples: readonly string[];
|
|
6497
|
+
/** `matched` goes somewhere; `skipped` is left out on purpose; `unmatched` still needs the user. */
|
|
6498
|
+
readonly status: 'matched' | 'skipped' | 'unmatched';
|
|
6499
|
+
/** Why a column is skipped or fixed, in words. */
|
|
6500
|
+
readonly note?: string;
|
|
6501
|
+
/** True for a column the template itself needs as it is (its row links); it cannot be rewired. */
|
|
6502
|
+
readonly fixed: boolean;
|
|
6503
|
+
}
|
|
6504
|
+
/** One field of the form a column can go to. */
|
|
6505
|
+
interface MatchField {
|
|
6506
|
+
/** Unique within the report. */
|
|
6507
|
+
readonly id: string;
|
|
6508
|
+
/** The sheet whose rows fill it. */
|
|
6509
|
+
readonly sheet: string;
|
|
6510
|
+
/** The field's key — for a recipe, the recipe key (`<list>.<child>` for a list's field). */
|
|
6511
|
+
readonly key: string;
|
|
6512
|
+
/** The field's label. */
|
|
6513
|
+
readonly label: string;
|
|
6514
|
+
/** True when every record must have it. */
|
|
6515
|
+
readonly required: boolean;
|
|
6516
|
+
/** The list a field belongs to, when it is one of a list's fields. */
|
|
6517
|
+
readonly group?: string;
|
|
6518
|
+
/** Ids of the columns that feed it — several when they are joined. */
|
|
6519
|
+
readonly sources: readonly string[];
|
|
6520
|
+
/** True when it is a choice field, whose values can be matched to options. */
|
|
6521
|
+
readonly hasOptions: boolean;
|
|
6522
|
+
/** True when it is filled some other way than from a column (a fixed value, or a random option per row). */
|
|
6523
|
+
readonly filledOtherwise: boolean;
|
|
6524
|
+
/** True when that other way is a random option per row, so the field is not labelled a fixed value. */
|
|
6525
|
+
readonly filledRandomly?: boolean;
|
|
6526
|
+
/**
|
|
6527
|
+
* How many of the file's values for the field pass its format rules, checked
|
|
6528
|
+
* before the rows are — set only when some do not, so the field can warn early.
|
|
6529
|
+
*/
|
|
6530
|
+
readonly fit?: FieldFit;
|
|
6531
|
+
}
|
|
6532
|
+
/** The pre-check of one field's values against its own format rules (pattern, length, range). */
|
|
6533
|
+
interface FieldFit {
|
|
6534
|
+
/** Non-blank values that pass. */
|
|
6535
|
+
readonly passing: number;
|
|
6536
|
+
/** Non-blank values checked. */
|
|
6537
|
+
readonly total: number;
|
|
6538
|
+
/** What the field expects, in words — "a value like “-25.7, 28.2”". */
|
|
6539
|
+
readonly expects: string;
|
|
6540
|
+
/** A one-step fix the check found, in words — "Join GpsLat and GpsLon with “, ”" — when there is one. */
|
|
6541
|
+
readonly suggestion?: string;
|
|
6542
|
+
}
|
|
6543
|
+
/** The outcome of the check. */
|
|
6544
|
+
interface MatchReport {
|
|
6545
|
+
/** Every column of the file with a header, in sheet and column order. */
|
|
6546
|
+
readonly columns: readonly MatchColumn[];
|
|
6547
|
+
/** Every field a column can go to. */
|
|
6548
|
+
readonly fields: readonly MatchField[];
|
|
6549
|
+
/** Columns accounted for: matched or skipped. */
|
|
6550
|
+
readonly accounted: number;
|
|
6551
|
+
/** Columns in all. */
|
|
6552
|
+
readonly total: number;
|
|
6553
|
+
/** Required fields in all — for a template, the main sheet's. */
|
|
6554
|
+
readonly requiredTotal: number;
|
|
6555
|
+
/** Required fields with a column (or a fixed value) going to them. */
|
|
6556
|
+
readonly requiredConnected: number;
|
|
6557
|
+
/** Labels of required fields no column goes to. */
|
|
6558
|
+
readonly missing: readonly string[];
|
|
6559
|
+
/** Anything else that blocks, in words. */
|
|
6560
|
+
readonly problems: readonly string[];
|
|
6561
|
+
/** Sheets of the file that are not part of the template — left out. */
|
|
6562
|
+
readonly unknownSheets: readonly string[];
|
|
6563
|
+
/** True when the rows can be checked: every required field connected, something connected at all, and nothing blocks. */
|
|
6564
|
+
readonly complete: boolean;
|
|
6565
|
+
}
|
|
6566
|
+
/** The id of a template column. */
|
|
6567
|
+
declare function templateColumnId(sheet: string, header: string): string;
|
|
6568
|
+
/** The id of a template field. */
|
|
6569
|
+
declare function templateFieldId(sheet: string, key: string): string;
|
|
6570
|
+
/** The data sheets of a file, in file order, each with the form sheet it fills (if any). */
|
|
6571
|
+
declare function templateSheets(grids: readonly SourceSheet[], formSheets: readonly ImportSheet[]): {
|
|
6572
|
+
readonly sheet: SourceSheet;
|
|
6573
|
+
readonly form: ImportSheet | undefined;
|
|
6574
|
+
}[];
|
|
6575
|
+
/**
|
|
6576
|
+
* The check of a template file. Per sheet, a column the user chose for wins —
|
|
6577
|
+
* filling every field it was sent to; the rest are matched automatically —
|
|
6578
|
+
* first a header that IS a field's key, then one that reads as its key, label
|
|
6579
|
+
* or alias — each field taken once. A
|
|
6580
|
+
* column with no data that matches nothing is skipped as empty. The row-link
|
|
6581
|
+
* columns (`$index`, `$sheetBound`, a list's marker column) are kept as they
|
|
6582
|
+
* are, and the system's own columns are skipped. A sheet that is not part of
|
|
6583
|
+
* the template is left out whole.
|
|
6584
|
+
*/
|
|
6585
|
+
declare function templateReport(grids: readonly SourceSheet[], formSheets: readonly ImportSheet[], choices: TemplateChoices): MatchReport;
|
|
6586
|
+
/**
|
|
6587
|
+
* The template file's rows with each column renamed to the field it goes to:
|
|
6588
|
+
* a matched column under its field's key (under each, when it fills several),
|
|
6589
|
+
* a row-link column as it is, every
|
|
6590
|
+
* other column dropped, and every sheet that is not part of the template left
|
|
6591
|
+
* out. The result goes to `consolidateSheets` as the parse always did.
|
|
6592
|
+
*/
|
|
6593
|
+
declare function applyTemplateMatches(parsed: Readonly<Record<string, readonly unknown[]>>, report: MatchReport): Record<string, unknown[]>;
|
|
6594
|
+
/**
|
|
6595
|
+
* The check of a spreadsheet read through `recipe`. A column is matched when
|
|
6596
|
+
* the recipe reads it anywhere — a field, a grouping, a row rule, a choice
|
|
6597
|
+
* narrowing — skipped when the user marked it (`skipped`) or it holds no
|
|
6598
|
+
* data, and unmatched otherwise. Required fields left without a source and
|
|
6599
|
+
* every other blocking issue of `check` hold the step.
|
|
6600
|
+
*/
|
|
6601
|
+
declare function recipeReport(input: {
|
|
6602
|
+
readonly table: SourceTable;
|
|
6603
|
+
readonly recipe: ImportRecipe;
|
|
6604
|
+
readonly check: RecipeCheck;
|
|
6605
|
+
readonly mainColumns: readonly ImportColumn[];
|
|
6606
|
+
readonly detailColumns: readonly ImportColumn[];
|
|
6607
|
+
readonly detailTarget: string | null;
|
|
6608
|
+
readonly detailLabel: string;
|
|
6609
|
+
readonly skipped: ReadonlySet<string>;
|
|
6610
|
+
}): MatchReport;
|
|
6611
|
+
|
|
6612
|
+
/**
|
|
6613
|
+
* Source row id → where that row sits in the uploaded file. Ids are minted per
|
|
6614
|
+
* upload (`toSourceTable`), so an index is only good for the session that built it.
|
|
6615
|
+
*/
|
|
6616
|
+
type SourceIndex = ReadonlyMap<string, {
|
|
6617
|
+
readonly sheet: string;
|
|
6618
|
+
readonly row: number;
|
|
6619
|
+
}>;
|
|
6620
|
+
/**
|
|
6621
|
+
* Indexes every row of `table` by its source row id, so a mapped record's
|
|
6622
|
+
* `$sourceRows` (or a sub-row's `id`) can be shown as a place in the file.
|
|
6623
|
+
*/
|
|
6624
|
+
declare function buildSourceIndex(table: SourceTable): SourceIndex;
|
|
6625
|
+
/**
|
|
6626
|
+
* Says where the given source rows are, in words: `Sheet Orders · row 12`,
|
|
6627
|
+
* `Sheet Orders · rows 12–15`, `Sheet Orders · rows 3, 7, 9–11`. Rows of several
|
|
6628
|
+
* sheets are listed per sheet, `; ` apart, in first-seen order. Ids the index
|
|
6629
|
+
* does not know are ignored; `''` when nothing is left.
|
|
6630
|
+
*
|
|
6631
|
+
* @param ids The source row ids, e.g. a record's `$sourceRows`.
|
|
6632
|
+
* @param index The session's source index.
|
|
6633
|
+
*/
|
|
6634
|
+
declare function describeSourceRows(ids: readonly string[] | undefined, index: SourceIndex): string;
|
|
6635
|
+
/**
|
|
6636
|
+
* The text a column source gives one source row: the library's own
|
|
6637
|
+
* `columnCellText`, the rule `applyRecipe` reads cells by, so the mapper's
|
|
6638
|
+
* samples and value outcomes match what the import will receive.
|
|
6639
|
+
*
|
|
6640
|
+
* @param source Where the cell comes from.
|
|
6641
|
+
* @param row The source row.
|
|
6642
|
+
*/
|
|
6643
|
+
declare function sourceCellText(source: ColumnSource, row: SourceRow): string;
|
|
6644
|
+
/** Whether `source` puts something in the cell — the rule `checkRecipe` counts a field as mapped by. */
|
|
6645
|
+
declare function sourceFills(source: ColumnSource | undefined): boolean;
|
|
6646
|
+
|
|
6647
|
+
/** The select's value for each kind of source; a source column is `column:<header>`. */
|
|
6648
|
+
type SourceChoice = `column:${string}` | 'constant' | 'join' | 'random' | 'skip' | '';
|
|
6649
|
+
/** One option of a choice field, once per stored value, as a fixed or random source offers it. */
|
|
6650
|
+
interface LineOption {
|
|
6651
|
+
/** The stored value — what a constant or random source holds. */
|
|
6652
|
+
readonly value: string;
|
|
6653
|
+
/** What the form shows. */
|
|
6654
|
+
readonly text: string;
|
|
6655
|
+
}
|
|
6656
|
+
/** The operation of a transform step. */
|
|
6657
|
+
type TransformOp = TransformStep['op'];
|
|
6658
|
+
/** A field of a transform step the user can edit. */
|
|
6659
|
+
type StepField = 'to' | 'find' | 'with' | 'on' | 'take' | 'format' | 'decimal' | 'stripCurrency' | 'by' | 'prefix' | 'suffix';
|
|
6660
|
+
/** One target field of the mapper, with everything its line shows. */
|
|
6661
|
+
interface MapperLine {
|
|
6662
|
+
/** The recipe key: the column key, or `<detailTarget>.<childKey>` for a detail line. */
|
|
6663
|
+
readonly key: string;
|
|
6664
|
+
readonly column: ImportColumn;
|
|
6665
|
+
readonly source: ColumnSource | undefined;
|
|
6666
|
+
readonly choice: SourceChoice;
|
|
6667
|
+
/** Whether the field has options, so its values can be matched in the choice mapper. */
|
|
6668
|
+
readonly hasOptions: boolean;
|
|
6669
|
+
/** The field's loaded options, once per stored value; empty when none are known. */
|
|
6670
|
+
readonly options: readonly LineOption[];
|
|
6671
|
+
/** Whether {@link options} is the whole list, so a fixed value is picked from it rather than typed. */
|
|
6672
|
+
readonly optionsComplete: boolean;
|
|
6673
|
+
/** Columns the source reads that the file does not have. */
|
|
6674
|
+
readonly missing: readonly string[];
|
|
6675
|
+
/** Whether a missing column blocks validation (it feeds a required field). */
|
|
6676
|
+
readonly missingBlocks: boolean;
|
|
6677
|
+
/** Required, not filled, and the recipe is a saved one: the form gained the field since. */
|
|
6678
|
+
readonly newRequired: boolean;
|
|
6679
|
+
/** Required and not filled. */
|
|
6680
|
+
readonly unmapped: boolean;
|
|
6681
|
+
/** Up to three distinct non-blank values the source gives, after its transforms. */
|
|
6682
|
+
readonly samples: readonly string[];
|
|
6683
|
+
/** The transform steps of a column source, in order. */
|
|
6684
|
+
readonly transforms: readonly TransformStep[];
|
|
6685
|
+
}
|
|
6686
|
+
/** One list of lines: the main fields, or the grouped list's row fields. */
|
|
6687
|
+
interface MapperSection {
|
|
6688
|
+
readonly id: 'main' | 'detail';
|
|
6689
|
+
readonly detail: boolean;
|
|
6690
|
+
readonly lines: readonly MapperLine[];
|
|
6691
|
+
}
|
|
6692
|
+
/** A key the recipe maps that is no longer a field the import can fill. */
|
|
6693
|
+
interface StaleLine {
|
|
6694
|
+
readonly key: string;
|
|
6695
|
+
}
|
|
6696
|
+
/** The text typed into the search box of one open column list. */
|
|
6697
|
+
interface ColumnSearch {
|
|
6698
|
+
/** Which select is filtered: `<recipe key>|source` or `<recipe key>|join`. */
|
|
6699
|
+
readonly id: string;
|
|
6700
|
+
readonly text: string;
|
|
6701
|
+
}
|
|
6702
|
+
/**
|
|
6703
|
+
* Maps every target field of the form to where its value comes from in the
|
|
6704
|
+
* uploaded file: a source column (optionally transformed), a fixed value,
|
|
6705
|
+
* several columns joined, or nothing. Required fields come first, with an
|
|
6706
|
+
* `x/y required` counter, and each line shows a few values its source gives,
|
|
6707
|
+
* after its transforms, so the user can tell the right column at a glance.
|
|
6708
|
+
*
|
|
6709
|
+
* With a grouping, a second section maps the fields of the grouped list's
|
|
6710
|
+
* rows, keyed `<detailTarget>.<childKey>`; the counter covers both sections.
|
|
6711
|
+
*
|
|
6712
|
+
* It also shows what {@link RecipeCheck} found: a field the form gained since
|
|
6713
|
+
* the mapping was saved ("New required field"), a column the file lacks
|
|
6714
|
+
* (flagged, the select doubling as the re-pick), and keys the form no longer
|
|
6715
|
+
* has (struck through; they are dropped when the mapping is saved).
|
|
6716
|
+
*
|
|
6717
|
+
* Presentational: every edit emits the whole new recipe on
|
|
6718
|
+
* {@link recipeChange}; inputs are never mutated.
|
|
6719
|
+
*/
|
|
6720
|
+
declare class ImportColumnMapperComponent {
|
|
6721
|
+
#private;
|
|
6722
|
+
/** The fields the recipe can fill — the main sheet's columns; non-importable ones are left out. */
|
|
6723
|
+
readonly columns: _angular_core.InputSignal<readonly ImportColumn[]>;
|
|
6724
|
+
/** The uploaded sheet read under its header row. */
|
|
6725
|
+
readonly table: _angular_core.InputSignal<SourceTable>;
|
|
6726
|
+
/** The recipe being edited. */
|
|
6727
|
+
readonly recipe: _angular_core.InputSignal<ImportRecipe>;
|
|
6728
|
+
/** `checkRecipe` for {@link recipe} against this file, recomputed by the host on every change. */
|
|
6729
|
+
readonly check: _angular_core.InputSignal<RecipeCheck>;
|
|
6730
|
+
/** The columns of the grouping's detail sheet (`$index` excluded); empty without a grouping. */
|
|
6731
|
+
readonly detailColumns: _angular_core.InputSignal<readonly ImportColumn[]>;
|
|
6732
|
+
/** The grouping's `detailTarget`; `null` hides the detail section. */
|
|
6733
|
+
readonly detailTarget: _angular_core.InputSignal<string | null>;
|
|
6734
|
+
/** What the detail section calls the list; falls back to the main column's label, then the key. */
|
|
6735
|
+
readonly detailLabel: _angular_core.InputSignal<string>;
|
|
6736
|
+
/**
|
|
6737
|
+
* One recipe key to show alone, without the heading or the stale list — the
|
|
6738
|
+
* settings of a single field, opened from a line of the connector mapper.
|
|
6739
|
+
* `null` shows every field.
|
|
6740
|
+
*/
|
|
6741
|
+
readonly only: _angular_core.InputSignal<string | null>;
|
|
6742
|
+
/** Whether one field is shown alone, under a panel title that already names it. */
|
|
6743
|
+
protected readonly single: _angular_core.Signal<boolean>;
|
|
6744
|
+
/** The whole recipe after an edit. */
|
|
6745
|
+
readonly recipeChange: _angular_core.OutputEmitterRef<ImportRecipe>;
|
|
6746
|
+
/** The recipe key of a choice field whose values the user wants to match to options (prefixed for a detail field). */
|
|
6747
|
+
readonly editChoices: _angular_core.OutputEmitterRef<string>;
|
|
6748
|
+
/** The transforms the add menu offers. */
|
|
6749
|
+
protected readonly transformOps: readonly {
|
|
6750
|
+
readonly op: TransformOp;
|
|
6751
|
+
readonly label: string;
|
|
6752
|
+
}[];
|
|
6753
|
+
/** Keys whose transform area is open. */
|
|
6754
|
+
protected readonly openTransforms: _angular_core.WritableSignal<ReadonlySet<string>>;
|
|
6755
|
+
/** The file's headers, as the select offers them. */
|
|
6756
|
+
protected readonly headers: _angular_core.Signal<readonly string[]>;
|
|
6757
|
+
/** The search of the open column list; `null` while no list is filtered. Only one select is open at a time. */
|
|
6758
|
+
protected readonly columnSearch: _angular_core.WritableSignal<ColumnSearch | null>;
|
|
6759
|
+
/** One line per importable main field: new required fields first, then required, then the rest in form order. */
|
|
6760
|
+
protected readonly lines: _angular_core.Signal<readonly MapperLine[]>;
|
|
6761
|
+
/** One line per importable field of the grouped list's rows; empty without a grouping. */
|
|
6762
|
+
protected readonly detailLines: _angular_core.Signal<readonly MapperLine[]>;
|
|
6763
|
+
/** The main section, then the detail section when there is one. */
|
|
6764
|
+
protected readonly sections: _angular_core.Signal<readonly MapperSection[]>;
|
|
6765
|
+
/** The heading word for the grouped list. */
|
|
6766
|
+
protected readonly detailName: _angular_core.Signal<string>;
|
|
6767
|
+
/** Keys the recipe maps that are no longer importable fields of the form. */
|
|
6768
|
+
protected readonly staleLines: _angular_core.Signal<readonly StaleLine[]>;
|
|
6769
|
+
private readonly allLines;
|
|
6770
|
+
/** Required fields in total, both sections. */
|
|
6771
|
+
protected readonly requiredTotal: _angular_core.Signal<number>;
|
|
6772
|
+
/** Required fields with a source that fills them, both sections. */
|
|
6773
|
+
protected readonly requiredMapped: _angular_core.Signal<number>;
|
|
6774
|
+
/** Whether every required field is mapped. */
|
|
6775
|
+
protected readonly allRequiredMapped: _angular_core.Signal<boolean>;
|
|
6776
|
+
/** Sets the kind of source of `key` from the select. Switching keeps what it can (a column joins, a join keeps its first column). */
|
|
6777
|
+
protected pickSource(key: string, choice: SourceChoice): void;
|
|
6778
|
+
/** Sets the fixed value of a constant source. */
|
|
6779
|
+
protected setConstant(key: string, value: string): void;
|
|
6780
|
+
/** Sets the options a random source draws from, kept in the order the form offers them. */
|
|
6781
|
+
protected setRandomValues(key: string, values: readonly string[]): void;
|
|
6782
|
+
/** The values a random source draws from, for its multi-select. */
|
|
6783
|
+
protected randomValues(source: ColumnSource | undefined): readonly string[];
|
|
6784
|
+
/** The values a source holds that the field no longer offers, so its select still shows them. */
|
|
6785
|
+
protected unknownValues(line: MapperLine): readonly string[];
|
|
6786
|
+
/** Sets the columns of a join source, kept in the order the file has them. */
|
|
6787
|
+
protected setJoinColumns(key: string, columns: readonly string[]): void;
|
|
6788
|
+
/** Sets the separator of a join source. */
|
|
6789
|
+
protected setJoinSeparator(key: string, separator: string): void;
|
|
6790
|
+
/**
|
|
6791
|
+
* The headers select `id` lists: those its search matches, plus `keep` — the
|
|
6792
|
+
* current choice, so the select never loses the option it shows as its value.
|
|
6793
|
+
*/
|
|
6794
|
+
protected columnOptions(id: string, keep: readonly string[]): readonly string[];
|
|
6795
|
+
/** The column a single-column source reads, kept in its list while it is filtered. */
|
|
6796
|
+
protected chosenColumn(source: ColumnSource | undefined): readonly string[];
|
|
6797
|
+
/** The text typed into the search box of select `id`. */
|
|
6798
|
+
protected columnSearchText(id: string): string;
|
|
6799
|
+
/** Whether select `id` is filtered and no column of the file matches. */
|
|
6800
|
+
protected columnSearchMisses(id: string): boolean;
|
|
6801
|
+
/** Filters select `id`; no option stays highlighted, so Enter takes the first match. */
|
|
6802
|
+
protected setColumnSearch(id: string, text: string, select: MatSelect): void;
|
|
6803
|
+
/** Starts a column list unfiltered with the caret in its search box, and drops the filter when it closes. */
|
|
6804
|
+
protected columnListToggled(id: string, open: boolean, search: HTMLInputElement): void;
|
|
6805
|
+
/**
|
|
6806
|
+
* Keeps typing (space, Home/End, letters) in the search box; only the keys that
|
|
6807
|
+
* move through or leave the list reach the select. Enter with an option
|
|
6808
|
+
* highlighted picks it; with none, a single-column select (`key` set) takes
|
|
6809
|
+
* the first matching column.
|
|
6810
|
+
*/
|
|
6811
|
+
protected columnSearchKeydown(event: KeyboardEvent, id: string, select: MatSelect, key: string | null): void;
|
|
6812
|
+
/** Drops a key the form no longer has from the recipe now, rather than at save. */
|
|
6813
|
+
protected dropStale(key: string): void;
|
|
6814
|
+
/** Opens or closes the transform area of `key`. */
|
|
6815
|
+
protected toggleTransforms(key: string): void;
|
|
6816
|
+
/** Appends a step of `op`, with plain defaults, to the column source of `key`, and opens its area. */
|
|
6817
|
+
protected addStep(key: string, op: TransformOp): void;
|
|
6818
|
+
/** Sets one field of step `index` of `key` from its control. */
|
|
6819
|
+
protected editStep(key: string, index: number, field: StepField, value: string | boolean): void;
|
|
6820
|
+
/** Moves step `index` of `key` one place up (`-1`) or down (`1`). */
|
|
6821
|
+
protected moveStep(key: string, index: number, delta: -1 | 1): void;
|
|
6822
|
+
/** Removes step `index` of `key`. */
|
|
6823
|
+
protected removeStep(key: string, index: number): void;
|
|
6824
|
+
/** The plain-words name of a transform. */
|
|
6825
|
+
protected opLabel(op: TransformOp): string;
|
|
6826
|
+
/** The text a step's field shows in its control; `take` is shown counting from 1. */
|
|
6827
|
+
protected stepValue(step: TransformStep, field: StepField): string;
|
|
6828
|
+
/** Whether a number step strips currency symbols, for its checkbox. */
|
|
6829
|
+
protected stripsCurrency(step: TransformStep): boolean;
|
|
6830
|
+
/** The columns a join reads, for the multi-select. */
|
|
6831
|
+
protected joinColumns(source: ColumnSource | undefined): readonly string[];
|
|
6832
|
+
/** The value of a constant source, for its input. */
|
|
6833
|
+
protected constantValue(source: ColumnSource | undefined): string;
|
|
6834
|
+
/** The separator of a join source, for its input. */
|
|
6835
|
+
protected joinSeparator(source: ColumnSource | undefined): string;
|
|
6836
|
+
/** A DOM-safe id for the transform area of `key`. */
|
|
6837
|
+
protected areaId(key: string): string;
|
|
6838
|
+
private buildLines;
|
|
6839
|
+
private stepsOf;
|
|
6840
|
+
/** Sets the steps of a column source; an empty list drops `transforms`. */
|
|
6841
|
+
private setTransforms;
|
|
6842
|
+
private setSource;
|
|
6843
|
+
/** A few distinct values the source gives; an option a fixed or random source holds is shown as the form shows it. */
|
|
6844
|
+
private samplesOf;
|
|
6845
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ImportColumnMapperComponent, never>;
|
|
6846
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ImportColumnMapperComponent, "lib-import-column-mapper", never, { "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "table": { "alias": "table"; "required": true; "isSignal": true; }; "recipe": { "alias": "recipe"; "required": true; "isSignal": true; }; "check": { "alias": "check"; "required": true; "isSignal": true; }; "detailColumns": { "alias": "detailColumns"; "required": false; "isSignal": true; }; "detailTarget": { "alias": "detailTarget"; "required": false; "isSignal": true; }; "detailLabel": { "alias": "detailLabel"; "required": false; "isSignal": true; }; "only": { "alias": "only"; "required": false; "isSignal": true; }; }, { "recipeChange": "recipeChange"; "editChoices": "editChoices"; }, never, never, true, never>;
|
|
6847
|
+
}
|
|
6848
|
+
|
|
6849
|
+
/** How a value was settled — the choice ladder's reasons. */
|
|
6850
|
+
type Settled = 'map' | 'rule' | 'unique' | 'tied' | 'unmatched' | 'partial';
|
|
6851
|
+
/** An option as the pickers offer it: its stored value and a label that tells look-alikes apart. */
|
|
6852
|
+
interface PickOption {
|
|
6853
|
+
readonly value: string;
|
|
6854
|
+
readonly label: string;
|
|
6855
|
+
}
|
|
6856
|
+
/** One distinct source value and what the recipe makes of it. */
|
|
6857
|
+
interface ValueLine {
|
|
6858
|
+
readonly value: DistinctValue;
|
|
6859
|
+
/** The reason most of the value's rows were settled (or left) by. */
|
|
6860
|
+
readonly settled: Settled;
|
|
6861
|
+
/** The option it becomes: a label, "Depends on the row (n options)", or `''` when none. */
|
|
6862
|
+
readonly becomes: string;
|
|
6863
|
+
/** Rows of the value that settle to an option. */
|
|
6864
|
+
readonly settledRows: number;
|
|
6865
|
+
/** The user's own answer for the value (a `valueMap` entry without context), `''` for none. */
|
|
6866
|
+
readonly answer: string;
|
|
6867
|
+
}
|
|
6868
|
+
/** A narrowing rule with what is wrong with it. */
|
|
6869
|
+
interface NarrowLine {
|
|
6870
|
+
readonly rule: NarrowRule;
|
|
6871
|
+
readonly mode: 'column' | 'value';
|
|
6872
|
+
readonly attributeMissing: boolean;
|
|
6873
|
+
readonly columnMissing: boolean;
|
|
6874
|
+
}
|
|
6875
|
+
/**
|
|
6876
|
+
* Matches the values of one choice field in the uploaded file to the field's
|
|
6877
|
+
* options, through the recipe's {@link ChoiceRule}:
|
|
6878
|
+
*
|
|
6879
|
+
* - **Match on** — which option attribute the file's text names (a code, an
|
|
6880
|
+
* email…), or any text, as the import does by default;
|
|
6881
|
+
* - **Also match on** — attribute = a source column (or a fixed value) rules
|
|
6882
|
+
* the option must agree with as well as the text, so look-alike options are
|
|
6883
|
+
* told apart (two "Finance" departments by code or province). The columns
|
|
6884
|
+
* are considered together; for options loaded only while a row is checked
|
|
6885
|
+
* (a table, a picker, a list fetched per row) the import applies them then;
|
|
6886
|
+
* - **values** — every distinct value with its row count, the option it
|
|
6887
|
+
* becomes and how it was settled (your choice / narrowed / matched / several
|
|
6888
|
+
* options / no option), with a per-value picker writing a `valueMap` entry
|
|
6889
|
+
* and a bulk "map every unmatched value to…".
|
|
6890
|
+
*
|
|
6891
|
+
* Outcomes come from the library's `distinctValues` + `resolveChoice`, one
|
|
6892
|
+
* call per distinct (value, narrowing cells) pair, so they are exactly what
|
|
6893
|
+
* the import will do — except the automatic `when` narrowing by other mapped
|
|
6894
|
+
* fields, which needs the whole mapped row: this view passes an empty map, so
|
|
6895
|
+
* a value it shows as tied may still settle on import. The mapping preview,
|
|
6896
|
+
* built with `applyRecipe`, shows the real result.
|
|
6897
|
+
*
|
|
6898
|
+
* Presentational: every edit emits the whole new recipe on {@link recipeChange}.
|
|
6899
|
+
*/
|
|
6900
|
+
declare class ImportChoiceMapperComponent {
|
|
6901
|
+
/** The choice field, with its loaded `options`. */
|
|
6902
|
+
readonly column: _angular_core.InputSignal<ImportColumn>;
|
|
6903
|
+
/** The uploaded sheet read under its header row. */
|
|
6904
|
+
readonly table: _angular_core.InputSignal<SourceTable>;
|
|
6905
|
+
/** The recipe being edited. */
|
|
6906
|
+
readonly recipe: _angular_core.InputSignal<ImportRecipe>;
|
|
6907
|
+
/** `checkRecipe` for {@link recipe} against this file. */
|
|
6908
|
+
readonly check: _angular_core.InputSignal<RecipeCheck>;
|
|
6909
|
+
/** The whole recipe after an edit. */
|
|
6910
|
+
readonly recipeChange: _angular_core.OutputEmitterRef<ImportRecipe>;
|
|
6911
|
+
private readonly injector;
|
|
6912
|
+
private readonly picker;
|
|
6913
|
+
private readonly pickButtons;
|
|
6914
|
+
/** Normalised value whose option picker is open; one at a time keeps a long option list off every row. */
|
|
6915
|
+
protected readonly editing: _angular_core.WritableSignal<string | null>;
|
|
6916
|
+
/** The option the bulk action maps unmatched values to. */
|
|
6917
|
+
protected readonly bulkTarget: _angular_core.WritableSignal<string>;
|
|
6918
|
+
protected readonly settledCopy: Readonly<Record<Settled, {
|
|
6919
|
+
readonly label: string;
|
|
6920
|
+
readonly icon: string;
|
|
6921
|
+
readonly tone: "ok" | "warn" | "info";
|
|
6922
|
+
}>>;
|
|
6923
|
+
/** The file's headers. */
|
|
6924
|
+
protected readonly headers: _angular_core.Signal<readonly string[]>;
|
|
6925
|
+
/** Whether the field has a source, so it has values to match. */
|
|
6926
|
+
protected readonly hasSource: _angular_core.Signal<boolean>;
|
|
6927
|
+
/** The recipe's rule for the field, if any. */
|
|
6928
|
+
protected readonly rule: _angular_core.Signal<ChoiceRule | undefined>;
|
|
6929
|
+
/** The options, one per stored value, labelled so look-alikes differ ("Finance · KZN"). */
|
|
6930
|
+
protected readonly pickOptions: _angular_core.Signal<readonly PickOption[]>;
|
|
6931
|
+
/** Whether the loaded list is cut short, so a value can be valid without being listed. */
|
|
6932
|
+
protected readonly partial: _angular_core.Signal<boolean>;
|
|
6933
|
+
/** Whether no option is loaded yet — the form fetches them per row — so every value is matched during validation. */
|
|
6934
|
+
protected readonly deferred: _angular_core.Signal<boolean>;
|
|
6935
|
+
/**
|
|
6936
|
+
* The option attributes to match on, for *Match on* and *Also match on*: the
|
|
6937
|
+
* ones the field's configuration declares (a table's columns, known before
|
|
6938
|
+
* any row is loaded) first, then any other a loaded option carries.
|
|
6939
|
+
*/
|
|
6940
|
+
protected readonly attributes: _angular_core.Signal<readonly ImportOptionAttribute[]>;
|
|
6941
|
+
/**
|
|
6942
|
+
* Whether an attribute the options lack can be called gone: only when the
|
|
6943
|
+
* options were loaded, or the configuration declares the attributes. A list
|
|
6944
|
+
* the form loads per row, unknown until then, proves nothing.
|
|
6945
|
+
*/
|
|
6946
|
+
private readonly attributesKnown;
|
|
6947
|
+
/** The *Match on* attribute when no option carries it any more. */
|
|
6948
|
+
protected readonly matchOnMissing: _angular_core.Signal<string | null>;
|
|
6949
|
+
/** The further columns each option must agree with, flagged. */
|
|
6950
|
+
protected readonly narrowLines: _angular_core.Signal<readonly NarrowLine[]>;
|
|
6951
|
+
/** What the field calls an attribute — a table column's heading — for the selects. */
|
|
6952
|
+
protected attributeLabel(key: string): string;
|
|
6953
|
+
private isMissing;
|
|
6954
|
+
/** The check's findings about this field's options and attributes. */
|
|
6955
|
+
protected readonly issues: _angular_core.Signal<readonly RecipeIssue[]>;
|
|
6956
|
+
/** Every distinct value of the field's source with its outcome, most frequent first. */
|
|
6957
|
+
protected readonly allValues: _angular_core.Signal<readonly ValueLine[]>;
|
|
6958
|
+
/** The values listed, capped at {@link MAX_VALUES}. */
|
|
6959
|
+
protected readonly values: _angular_core.Signal<ValueLine[]>;
|
|
6960
|
+
/** How many distinct values are not listed. */
|
|
6961
|
+
protected readonly hiddenValues: _angular_core.Signal<number>;
|
|
6962
|
+
/** Values no option matches on any row and the user has not answered — what the bulk action maps. */
|
|
6963
|
+
protected readonly unmatched: _angular_core.Signal<ValueLine[]>;
|
|
6964
|
+
/** Sets which attribute the file's text names; `''` = any text. */
|
|
6965
|
+
protected setMatchOn(attribute: string): void;
|
|
6966
|
+
/**
|
|
6967
|
+
* Adds a column the option must also agree with: an attribute not yet used
|
|
6968
|
+
* (nor matched on), read from the file's column named like it — by key or
|
|
6969
|
+
* by heading — when there is one.
|
|
6970
|
+
*/
|
|
6971
|
+
protected addNarrow(): void;
|
|
6972
|
+
/** Removes the narrowing rule at `index`. */
|
|
6973
|
+
protected removeNarrow(index: number): void;
|
|
6974
|
+
/** Changes the attribute the rule at `index` compares. */
|
|
6975
|
+
protected setNarrowAttribute(index: number, attribute: string): void;
|
|
6976
|
+
/** Switches the rule at `index` between a source column and a fixed value. */
|
|
6977
|
+
protected setNarrowMode(index: number, mode: 'column' | 'value'): void;
|
|
6978
|
+
/** Sets the source column the rule at `index` reads. */
|
|
6979
|
+
protected setNarrowColumn(index: number, column: string): void;
|
|
6980
|
+
/** Sets the fixed value the rule at `index` compares with. */
|
|
6981
|
+
protected setNarrowValue(index: number, value: string): void;
|
|
6982
|
+
/** The column a rule reads, for its select. */
|
|
6983
|
+
protected narrowColumn(rule: NarrowRule): string;
|
|
6984
|
+
/** The fixed value a rule compares with, for its input. */
|
|
6985
|
+
protected narrowValue(rule: NarrowRule): string;
|
|
6986
|
+
/**
|
|
6987
|
+
* Swaps a value's "Pick an option" button for its option select, focused and
|
|
6988
|
+
* open, so the keyboard user lands where the button was.
|
|
6989
|
+
*/
|
|
6990
|
+
protected openPicker(normalised: string): void;
|
|
6991
|
+
/** Closes a value's select without an answer (Escape, a click away), back to its button. */
|
|
6992
|
+
protected closePicker(normalised: string): void;
|
|
6993
|
+
/** Records the user's option for a value (`''` clears it, leaving the value to the rules), and closes its picker. */
|
|
6994
|
+
protected answer(normalised: string, optionValue: string): void;
|
|
6995
|
+
/** Puts focus back on a value's "Pick an option" button once it is rendered again. */
|
|
6996
|
+
private focusPickButton;
|
|
6997
|
+
/** Maps every unmatched value to the bulk target. */
|
|
6998
|
+
protected mapAllUnmatched(): void;
|
|
6999
|
+
/** The label of a stored option value. */
|
|
7000
|
+
protected labelOf(optionValue: string): string;
|
|
7001
|
+
private patchNarrow;
|
|
7002
|
+
private writeNarrow;
|
|
7003
|
+
private writeValueMap;
|
|
7004
|
+
/** Emits the recipe with `next` as the field's rule; an empty rule is removed rather than stored. */
|
|
7005
|
+
private writeRule;
|
|
7006
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ImportChoiceMapperComponent, never>;
|
|
7007
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ImportChoiceMapperComponent, "lib-import-choice-mapper", never, { "column": { "alias": "column"; "required": true; "isSignal": true; }; "table": { "alias": "table"; "required": true; "isSignal": true; }; "recipe": { "alias": "recipe"; "required": true; "isSignal": true; }; "check": { "alias": "check"; "required": true; "isSignal": true; }; }, { "recipeChange": "recipeChange"; }, never, never, true, never>;
|
|
7008
|
+
}
|
|
7009
|
+
|
|
7010
|
+
/** The comparison of a row rule. */
|
|
7011
|
+
type RuleOp = RowRule['op'];
|
|
7012
|
+
/** One rule as its line shows it. */
|
|
7013
|
+
interface RuleLine {
|
|
7014
|
+
readonly rule: RowRule;
|
|
7015
|
+
/** The rule's index in the recipe's flat `rowRules` — what every edit addresses. */
|
|
7016
|
+
readonly index: number;
|
|
7017
|
+
/** Whether the op compares with a value, so the value field shows. */
|
|
7018
|
+
readonly needsValue: boolean;
|
|
7019
|
+
/** Whether the rule's column is not in this file (every row then reads it as blank). */
|
|
7020
|
+
readonly columnMissing: boolean;
|
|
7021
|
+
}
|
|
7022
|
+
/** One `and` group of rules, as its card shows it. */
|
|
7023
|
+
interface RuleGroup {
|
|
7024
|
+
readonly lines: readonly RuleLine[];
|
|
7025
|
+
/** Rows every rule of the group holds for. */
|
|
7026
|
+
readonly kept: number;
|
|
7027
|
+
}
|
|
7028
|
+
/**
|
|
7029
|
+
* Edits the recipe's row rules — which source rows are imported. Rules sit in
|
|
7030
|
+
* groups: every rule of a group must hold (`and`), and a row is kept when any
|
|
7031
|
+
* one group holds (`or`). The live counts come from the engine's own
|
|
7032
|
+
* `matchesRowRules`, so "N of M rows kept" is exactly what the import reads.
|
|
7033
|
+
*
|
|
7034
|
+
* Presentational: every edit emits the whole new recipe on
|
|
7035
|
+
* {@link recipeChange}; removing the last rule drops `rowRules`.
|
|
7036
|
+
*/
|
|
7037
|
+
declare class ImportRowRulesComponent {
|
|
7038
|
+
/** The recipe being edited. */
|
|
7039
|
+
readonly recipe: _angular_core.InputSignal<ImportRecipe>;
|
|
7040
|
+
/** The uploaded sheet read under its header row. */
|
|
7041
|
+
readonly table: _angular_core.InputSignal<SourceTable>;
|
|
7042
|
+
/**
|
|
7043
|
+
* Whether the section names itself. Off where its host already titles it —
|
|
7044
|
+
* a side panel headed "Which rows to import" — so the title is not said twice.
|
|
7045
|
+
*/
|
|
7046
|
+
readonly showTitle: _angular_core.InputSignal<boolean>;
|
|
7047
|
+
/**
|
|
7048
|
+
* The saved mapping the rules are kept in, by name — `null` while they are
|
|
7049
|
+
* not saved as they stand (a new mapping, or a saved one changed since).
|
|
7050
|
+
* Rules travel with the mapping, so everyone who uses it filters the same
|
|
7051
|
+
* rows; the section says which, and offers the save when they would be lost.
|
|
7052
|
+
*/
|
|
7053
|
+
readonly savedAs: _angular_core.InputSignal<string | null>;
|
|
7054
|
+
/** Whether the host can save the mapping now; the save is offered only then. */
|
|
7055
|
+
readonly canSave: _angular_core.InputSignal<boolean>;
|
|
7056
|
+
/** The whole recipe after an edit. */
|
|
7057
|
+
readonly recipeChange: _angular_core.OutputEmitterRef<ImportRecipe>;
|
|
7058
|
+
/** The person asked to save the mapping, rules and all — the host opens its save. */
|
|
7059
|
+
readonly saveRequested: _angular_core.OutputEmitterRef<void>;
|
|
7060
|
+
/** The comparisons the op select offers. */
|
|
7061
|
+
protected readonly ops: readonly {
|
|
7062
|
+
readonly op: RuleOp;
|
|
7063
|
+
readonly label: string;
|
|
7064
|
+
}[];
|
|
7065
|
+
/** The file's headers, as the column select offers them. */
|
|
7066
|
+
protected readonly headers: _angular_core.Signal<readonly string[]>;
|
|
7067
|
+
/** The rules as their `and` groups, in order, each with the rows it keeps on its own. */
|
|
7068
|
+
protected readonly groups: _angular_core.Signal<readonly RuleGroup[]>;
|
|
7069
|
+
/** Rows in the file. */
|
|
7070
|
+
protected readonly total: _angular_core.Signal<number>;
|
|
7071
|
+
/** Rows the rules keep. */
|
|
7072
|
+
protected readonly kept: _angular_core.Signal<number>;
|
|
7073
|
+
/** Adds a rule to the last group (the first rule, when there is none). */
|
|
7074
|
+
protected addRule(): void;
|
|
7075
|
+
/** Adds an `and` rule at the end of group `group`. */
|
|
7076
|
+
protected addAnd(group: number): void;
|
|
7077
|
+
/** Starts a new group — the rows it keeps are kept as well as those of the groups above. */
|
|
7078
|
+
protected addOr(): void;
|
|
7079
|
+
/**
|
|
7080
|
+
* Removes rule `index`. When it opened a group, the next rule of that group
|
|
7081
|
+
* opens it instead, so the group stays apart from the one above.
|
|
7082
|
+
*/
|
|
7083
|
+
protected removeRule(index: number): void;
|
|
7084
|
+
/** Sets the column rule `index` reads. */
|
|
7085
|
+
protected setColumn(index: number, column: string): void;
|
|
7086
|
+
/** Sets the comparison of rule `index`; a blank test drops the value. */
|
|
7087
|
+
protected setOp(index: number, op: RuleOp): void;
|
|
7088
|
+
/** Sets the value rule `index` compares with. */
|
|
7089
|
+
protected setValue(index: number, value: string): void;
|
|
7090
|
+
private newRule;
|
|
7091
|
+
private rules;
|
|
7092
|
+
private patch;
|
|
7093
|
+
/** Emits the recipe with `rules`, each `join` written only where it says `or` after the first rule. */
|
|
7094
|
+
private setRules;
|
|
7095
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ImportRowRulesComponent, never>;
|
|
7096
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ImportRowRulesComponent, "lib-import-row-rules", never, { "recipe": { "alias": "recipe"; "required": true; "isSignal": true; }; "table": { "alias": "table"; "required": true; "isSignal": true; }; "showTitle": { "alias": "showTitle"; "required": false; "isSignal": true; }; "savedAs": { "alias": "savedAs"; "required": false; "isSignal": true; }; "canSave": { "alias": "canSave"; "required": false; "isSignal": true; }; }, { "recipeChange": "recipeChange"; "saveRequested": "saveRequested"; }, never, never, true, never>;
|
|
7097
|
+
}
|
|
7098
|
+
|
|
7099
|
+
/** A saved mapping of the workflow whose columns do not fit the file closely enough to be offered. */
|
|
7100
|
+
interface OtherSavedMapping {
|
|
7101
|
+
readonly recipe: ImportRecipe;
|
|
7102
|
+
/** Share of column names it has in common with the file, 0–1. */
|
|
7103
|
+
readonly similarity: number;
|
|
7104
|
+
}
|
|
7105
|
+
/** One line of the list, its check summed up. */
|
|
7106
|
+
interface Entry {
|
|
7107
|
+
readonly recipe: ImportRecipe;
|
|
7108
|
+
/** Share of the same columns, as a whole percentage. */
|
|
7109
|
+
readonly percent: number;
|
|
7110
|
+
/** Issues that must be fixed before it can check rows or be saved; `null` for a mapping not checked against this file. */
|
|
7111
|
+
readonly blocking: number | null;
|
|
7112
|
+
/** How its connections compare with the mapping in use, in words; `null` for that one, or when none is in use. */
|
|
7113
|
+
readonly comparison: string | null;
|
|
7114
|
+
}
|
|
7115
|
+
/**
|
|
7116
|
+
* Every import mapping saved for the workflow, in one place: the ones whose
|
|
7117
|
+
* columns fit the uploaded file first (each with whether it is ready), then
|
|
7118
|
+
* the rest — still usable, the mapper flags what no longer fits. The one in
|
|
7119
|
+
* use is marked rather than offered. An entry the user may remove
|
|
7120
|
+
* ({@link removable}) has **Remove**, confirmed in place.
|
|
7121
|
+
*
|
|
7122
|
+
* Presentational: the host applies or removes the mapping.
|
|
7123
|
+
*/
|
|
7124
|
+
declare class ImportSavedMappingsComponent {
|
|
7125
|
+
private readonly injector;
|
|
7126
|
+
/** Saved mappings whose columns fit the file, each checked against it. */
|
|
7127
|
+
readonly fits: _angular_core.InputSignal<readonly SavedRecipeMatch[]>;
|
|
7128
|
+
/** The workflow's other saved mappings, closest first. */
|
|
7129
|
+
readonly others: _angular_core.InputSignal<readonly OtherSavedMapping[]>;
|
|
7130
|
+
/** Id of the mapping in use, or `null` when the columns are matched some other way. */
|
|
7131
|
+
readonly activeId: _angular_core.InputSignal<string | null>;
|
|
7132
|
+
/**
|
|
7133
|
+
* The mapping in use, edits included, so every other entry can say whether
|
|
7134
|
+
* it connects the fields the same way or where it differs; `undefined`
|
|
7135
|
+
* leaves that line out.
|
|
7136
|
+
*/
|
|
7137
|
+
readonly active: _angular_core.InputSignal<ImportRecipe | undefined>;
|
|
7138
|
+
/** Ids the user may remove — their creator, or a department admin. */
|
|
7139
|
+
readonly removable: _angular_core.InputSignal<ReadonlySet<string>>;
|
|
7140
|
+
/** Whether a save or removal is in flight; Remove waits for it. */
|
|
7141
|
+
readonly busy: _angular_core.InputSignal<boolean>;
|
|
7142
|
+
/** The user chose a mapping. */
|
|
7143
|
+
readonly useMapping: _angular_core.OutputEmitterRef<ImportRecipe>;
|
|
7144
|
+
/** The user confirmed removing a mapping for everyone who imports into the workflow. */
|
|
7145
|
+
readonly removeMapping: _angular_core.OutputEmitterRef<ImportRecipe>;
|
|
7146
|
+
private readonly confirmButton;
|
|
7147
|
+
private readonly removeButtons;
|
|
7148
|
+
/** The entry asking "remove it?", by recipe id. */
|
|
7149
|
+
protected readonly confirming: _angular_core.WritableSignal<string | null>;
|
|
7150
|
+
/** The fitting mappings, closest first. */
|
|
7151
|
+
protected readonly fitEntries: _angular_core.Signal<readonly Entry[]>;
|
|
7152
|
+
/** The other mappings, closest first. */
|
|
7153
|
+
protected readonly otherEntries: _angular_core.Signal<readonly Entry[]>;
|
|
7154
|
+
/** How `recipe` compares with the mapping in use; `null` when it is that one or none is in use. */
|
|
7155
|
+
private comparisonOf;
|
|
7156
|
+
/** Whether the workflow has no saved mapping at all. */
|
|
7157
|
+
protected readonly empty: _angular_core.Signal<boolean>;
|
|
7158
|
+
/** Asks to confirm removing `recipe`; nothing is removed until {@link confirmRemove}. */
|
|
7159
|
+
protected askRemove(recipe: ImportRecipe): void;
|
|
7160
|
+
/** Removes the mapping being confirmed. */
|
|
7161
|
+
protected confirmRemove(recipe: ImportRecipe): void;
|
|
7162
|
+
/** Keeps the mapping after all, and puts focus back on its Remove button. */
|
|
7163
|
+
protected cancelRemove(): void;
|
|
7164
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ImportSavedMappingsComponent, never>;
|
|
7165
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ImportSavedMappingsComponent, "lib-import-saved-mappings", never, { "fits": { "alias": "fits"; "required": true; "isSignal": true; }; "others": { "alias": "others"; "required": true; "isSignal": true; }; "activeId": { "alias": "activeId"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "busy": { "alias": "busy"; "required": false; "isSignal": true; }; }, { "useMapping": "useMapping"; "removeMapping": "removeMapping"; }, never, never, true, never>;
|
|
7166
|
+
}
|
|
7167
|
+
|
|
7168
|
+
/** What is wrong with a typed name, if anything. */
|
|
7169
|
+
type NameProblem = 'blank' | 'taken' | 'own';
|
|
7170
|
+
/**
|
|
7171
|
+
* Saves the recipe being edited under a name unique to the workflow:
|
|
7172
|
+
*
|
|
7173
|
+
* - an unsaved recipe (`revision` 0) gets a name and **Save mapping**;
|
|
7174
|
+
* - a stored one offers **Update '<name>'** — the recipe as loaded, its
|
|
7175
|
+
* revision the guard — or **Save as new** under another name; Update is
|
|
7176
|
+
* held once {@link existing} shows a newer revision of it, and left out
|
|
7177
|
+
* while it is unchanged since it was saved ({@link edited});
|
|
7178
|
+
* - a refused save shows why ({@link conflict}): someone changed or removed
|
|
7179
|
+
* the mapping since it was opened (with **Save as copy**), or the name was
|
|
7180
|
+
* taken meanwhile.
|
|
7181
|
+
*
|
|
7182
|
+
* The name is checked live against {@link existing} — trimmed,
|
|
7183
|
+
* case-insensitively, ignoring the recipe's own id; the repository checks it
|
|
7184
|
+
* again against what is stored.
|
|
7185
|
+
*/
|
|
7186
|
+
declare class ImportRecipeSaveComponent implements OnChanges {
|
|
7187
|
+
private readonly destroyRef;
|
|
7188
|
+
/** The recipe to save. */
|
|
7189
|
+
readonly recipe: _angular_core.InputSignal<ImportRecipe>;
|
|
7190
|
+
/** The workflow's stored recipes, for the name check. */
|
|
7191
|
+
readonly existing: _angular_core.InputSignal<readonly ImportRecipe[]>;
|
|
7192
|
+
/** Why the last save was refused, or `null`. */
|
|
7193
|
+
readonly conflict: _angular_core.InputSignal<ImportRecipeConflict | null>;
|
|
7194
|
+
/** Whether a save is in flight; every save button waits. */
|
|
7195
|
+
readonly saving: _angular_core.InputSignal<boolean>;
|
|
7196
|
+
/** Why the recipe cannot be saved yet, in words; `null` when it can. */
|
|
7197
|
+
readonly blockedReason: _angular_core.InputSignal<string | null>;
|
|
7198
|
+
/** Required fields the recipe leaves unconnected — it can still be saved, and says so. */
|
|
7199
|
+
readonly unfinished: _angular_core.InputSignal<number>;
|
|
7200
|
+
/**
|
|
7201
|
+
* False when the recipe is a saved one with no changes since it was saved —
|
|
7202
|
+
* there is nothing to update, so only **Save as new** is offered.
|
|
7203
|
+
*/
|
|
7204
|
+
readonly edited: _angular_core.InputSignal<boolean>;
|
|
7205
|
+
/**
|
|
7206
|
+
* What a save keeps, in words — the matches and everything set up around
|
|
7207
|
+
* them (value changes, answers, row filters, grouping, the repeats settings)
|
|
7208
|
+
* — so a user knows the next import is set up the same way.
|
|
7209
|
+
*/
|
|
7210
|
+
protected readonly contents: _angular_core.Signal<readonly string[]>;
|
|
7211
|
+
/** Whether something on the canvas stops a save. */
|
|
7212
|
+
protected readonly blocked: _angular_core.Signal<boolean>;
|
|
7213
|
+
/** Save the recipe as a new one under this (trimmed) name. */
|
|
7214
|
+
readonly saveNew: _angular_core.OutputEmitterRef<string>;
|
|
7215
|
+
/** Update the stored recipe, as loaded. */
|
|
7216
|
+
readonly update: _angular_core.OutputEmitterRef<void>;
|
|
7217
|
+
/** After a conflict, save the edits as a new recipe under this (trimmed) name. */
|
|
7218
|
+
readonly saveCopy: _angular_core.OutputEmitterRef<string>;
|
|
7219
|
+
/** The name field. */
|
|
7220
|
+
protected readonly name: FormControl<string>;
|
|
7221
|
+
protected readonly errorMatcher: ErrorStateMatcher;
|
|
7222
|
+
private readonly typed;
|
|
7223
|
+
/** Recipe id the name field was last seeded for. */
|
|
7224
|
+
private seededFor;
|
|
7225
|
+
/** Whether the recipe is a stored one, so it can be updated. */
|
|
7226
|
+
protected readonly isStored: _angular_core.Signal<boolean>;
|
|
7227
|
+
/**
|
|
7228
|
+
* Whether the stored copy has moved past the revision being edited — someone
|
|
7229
|
+
* saved it since it was loaded — so an update would only be refused.
|
|
7230
|
+
*/
|
|
7231
|
+
protected readonly isStale: _angular_core.Signal<boolean>;
|
|
7232
|
+
/** The recipe's name as stored (the loaded copy may have been renamed meanwhile). */
|
|
7233
|
+
protected readonly storedName: _angular_core.Signal<string>;
|
|
7234
|
+
/** What is wrong with the typed name. */
|
|
7235
|
+
protected readonly problem: _angular_core.Signal<NameProblem | null>;
|
|
7236
|
+
/** Whether a conflict offers to save the edits as a copy. */
|
|
7237
|
+
protected readonly offersCopy: _angular_core.Signal<boolean>;
|
|
7238
|
+
/** Whether the new-name buttons can save. */
|
|
7239
|
+
protected readonly canSaveNamed: _angular_core.Signal<boolean>;
|
|
7240
|
+
/** Whether the update button can save. */
|
|
7241
|
+
protected readonly canUpdate: _angular_core.Signal<boolean>;
|
|
7242
|
+
constructor();
|
|
7243
|
+
/**
|
|
7244
|
+
* Keeps the name field in step with the inputs. Done here rather than in an
|
|
7245
|
+
* `effect()` because it writes the field (and through it {@link typed}).
|
|
7246
|
+
*/
|
|
7247
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
7248
|
+
/** Seeds the field when another recipe arrives; keeps what the user typed for the same one. */
|
|
7249
|
+
private seedName;
|
|
7250
|
+
/** A refused save: offers a free copy name, or shows the clash on the field. */
|
|
7251
|
+
private answerConflict;
|
|
7252
|
+
/** Emits the save the form currently offers for a typed name. */
|
|
7253
|
+
protected submitNamed(): void;
|
|
7254
|
+
/** What is wrong with `value` as the name of a new recipe. */
|
|
7255
|
+
private problemOf;
|
|
7256
|
+
/** `<name> (copy)`, numbered until no stored recipe has it. */
|
|
7257
|
+
private copyName;
|
|
7258
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ImportRecipeSaveComponent, never>;
|
|
7259
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ImportRecipeSaveComponent, "lib-import-recipe-save", never, { "recipe": { "alias": "recipe"; "required": true; "isSignal": true; }; "existing": { "alias": "existing"; "required": true; "isSignal": true; }; "conflict": { "alias": "conflict"; "required": true; "isSignal": true; }; "saving": { "alias": "saving"; "required": true; "isSignal": true; }; "blockedReason": { "alias": "blockedReason"; "required": false; "isSignal": true; }; "unfinished": { "alias": "unfinished"; "required": false; "isSignal": true; }; "edited": { "alias": "edited"; "required": false; "isSignal": true; }; }, { "saveNew": "saveNew"; "update": "update"; "saveCopy": "saveCopy"; }, never, never, true, never>;
|
|
7260
|
+
}
|
|
7261
|
+
|
|
4930
7262
|
declare function decrypt(encrypted: EncryptedData, secret: string): Promise<string>;
|
|
4931
7263
|
|
|
4932
7264
|
/**
|
|
@@ -5688,5 +8020,5 @@ declare function testAgainstItem(test: ConfigurationValidTestInterface, item: un
|
|
|
5688
8020
|
*/
|
|
5689
8021
|
declare const getSignatureImage: (inputConfig: FormColumnInputs, value: EncryptedData | undefined, secret: string) => Promise<string | undefined>;
|
|
5690
8022
|
|
|
5691
|
-
export { AI_ENDPOINT_CATALOG, AI_FORM_BUILDER_CONFIG, AI_MSCOA_GROUNDING, DialogTemplateComponent, FORM_ACTIONS_TOKEN, FORM_CONFIG_TOKEN, FORM_DRAFT_ORCHESTRATOR, FORM_INPUTS_TOKEN, FORM_ROUTE_SOURCE, FORM_SLIDES_TOKEN, FORM_SUGGESTION_REGISTRY, FormBuilderComponent, FormDraftOrchestrator, FormSuggestionRegistry, FormSuggestionRegistryService, FormTowerControllerService, FormatDataPipe, FormsComponent, HashbrownFormDraftOrchestratorService, 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, SPREADSHEET_PARSER, SPREADSHEET_WRITER, SignatureInputElementComponent, TDynamicDataEditComponent, TDynamicDataViewComponent, TEMPLATE_GUIDE_SHEET, TEMPLATE_OPTIONS_SHEET, TFormDraftPanelComponent, TFormImportController, TFormInputComponent, TSuggestionReviewComponent, UTILS_OBJECT_TOKEN, UserFormStepperComponent, ValidationExpressioCreatorComponent, applyOptionChoice, assignDeepPropertyToObject, buildBlueprintSchema, buildBriefSchema, buildFormImportTemplate, buildSuggestionSchema, createFileFromBase64, decrypt as decryptSecuredInputValue, formGenerator, generateSecretKey as generateInputSecretKey, getPipedValueFromDataType, getSampleValueForInput, getSectionElements, getSignatureImage, getUrl, getValueFromValueAccessor, initFormConfigToV2, provideNgxTForms, returnDeepProperty, returnMappedPathValue, safeReturnDeepProperty, sheetConsolodation, testAgainstItem, textIconsForUserHints, toSuggestionBatch, validateExpressionSyntax, validateObjectAgainstString, withAiEndpointCatalog, withAiFormBuilder, withAiMscoaGrounding, withFormSuggestions, withHttpPipeline, withInputSecret, withRouterFormId, withSpreadsheetImport };
|
|
5692
|
-
export type { AiEndpointCatalogEntry, AiEndpointCatalogProvider, AiEndpointCatalogSource, AiEndpointSlot, AiFormBuilderBudgets, AiFormBuilderConfig, AiFormBuilderModels, AiFormBuilderRole, AiMscoaAccountingBasis, AiMscoaGrounding, AiMscoaSegmentDescriptor, BlueprintField, BlueprintSlide, DescribeOptions, DraftFailure, DraftFinding, DraftFindingKind, DraftFindingSeverity, DraftMessage, DraftMessageAuthor, DraftPartial, DraftRepairRoute, DraftRepairTurn, DraftRepairTurnKind, DraftRequestMiddleware, DraftSession, DraftStage, DraftTelemetry, EditableFieldError, EditableFieldKind, EditableFieldSchema, EditableFieldValidation, FieldSuggestion, FormBlueprint, FormBrief, FormBriefField, FormBriefRule, FormImportTemplateOptions, FormSuggestionChannel, FormSuggestionSnapshot, ImportOptionCondition, ImportOptionList, ImportOptionLists, ImportRunOptions, ImportRunState, ImportTemplateOption, MscoaAccountSelection, MscoaCurrentSelection, MscoaFieldCapability, MscoaInnerInputDescriptor, MscoaSegmentDescriptor, MscoaSuggestionValue, MultipleRowSuggestionValue, SpreadsheetParser, SpreadsheetSheet, SpreadsheetSource, SpreadsheetTemplate, SpreadsheetTemplateSheet, SpreadsheetWriter, StagedSuggestion, SuggestionBatch };
|
|
8023
|
+
export { AI_ENDPOINT_CATALOG, AI_FORM_BUILDER_CONFIG, AI_MSCOA_GROUNDING, DEFAULT_SUBMIT_LABEL, DETAIL_INDEX_COLUMN, DialogTemplateComponent, FORM_ACTIONS_TOKEN, FORM_CONFIG_TOKEN, FORM_DRAFT_ORCHESTRATOR, FORM_INPUTS_TOKEN, FORM_ROUTE_SOURCE, FORM_SLIDES_TOKEN, FORM_SUGGESTION_REGISTRY, FieldDisplayValuePipe, FormBuilderComponent, FormDraftOrchestrator, FormSuggestionRegistry, FormSuggestionRegistryService, FormTowerControllerService, FormatDataPipe, FormsComponent, HashbrownFormDraftOrchestratorService, HttpMscoaAccountsRepository, HttpPipelineRepository, IMPORT_RECIPE_STORE, IMPORT_TOWER_INSTANCE_ID, INPUT_SECRET_TOKEN, ImportChoiceMapperComponent, ImportColumnMapperComponent, ImportRecipeSaveComponent, ImportRowRulesComponent, ImportSavedMappingsComponent, MAIN_SHEET, MSCOA_ACCOUNTS_REPOSITORY, MSCOA_TREE_PROVIDER, MSCOA_UNIQUE_ACCOUNT_FIELD, MULTIPLE_FORM_INPUT_TOKEN, MscoaAccountsRepository, MscoaFormInputComponent, NGX_T_FORMS_CONFIG_TOKEN, NgxTFormsComponent, NgxTFormsService, PIPELINE_REPOSITORY, PipelineRepository, PropertyAccessError, REPORT_PLAN_PREVIEW, SHEET_BOUND_MARKER, SPREADSHEET_PARSER, SPREADSHEET_WRITER, SignatureInputElementComponent, TDynamicDataEditComponent, TDynamicDataViewComponent, TEMPLATE_GUIDE_SHEET, TEMPLATE_ISSUES_SHEET, TEMPLATE_OPTIONS_SHEET, TFormDraftPanelComponent, TFormImportController, TFormInputComponent, TSuggestionReviewComponent, UTILS_OBJECT_TOKEN, UserFormStepperComponent, ValidationExpressioCreatorComponent, applyFieldRecipe, applyOptionChoice, applyRecipe, applyTemplateMatches, applyTransforms, assignDeepPropertyToObject, buildBlueprintSchema, buildBriefSchema, buildFormImportTemplate, buildSourceIndex, buildSuggestionSchema, buildUniqueKeyOptions, checkFieldRecipe, checkRecipe, collectableRows, columnCellText, createFileFromBase64, decrypt as decryptSecuredInputValue, describeFormImportSheets, describeImportColumns, describeOptionMatchCriteria, describeSourceRows, detectSource, distinctValues, fieldRecipeScope, formGenerator, formatFieldDisplayValue, generateSecretKey as generateInputSecretKey, getPipedValueFromDataType, getSampleValueForInput, getSectionElements, getSignatureImage, getUrl, getValueFromValueAccessor, guessHeaderRow, humaniseKey, initFormConfigToV2, isEmptyDisplayValue, joinableTexts, matchSavedFieldRecipes, matchesRowRule, matchesRowRules, normaliseOptionText, optionMatchCriteriaOf, personNameOf, provideNgxTForms, recipeReport, recipeSettingsOf, resolveChoice, returnDeepProperty, returnMappedPathValue, rowRuleGroups, safeReturnDeepProperty, sheetConsolodation, sourceCellText, sourceFills, suggestFieldRecipe, suggestRecipe, templateColumnId, templateFieldId, templateReport, templateSheets, testAgainstItem, textIconsForUserHints, toSourceTable, toSuggestionBatch, validateExpressionSyntax, validateObjectAgainstString, withAiEndpointCatalog, withAiFormBuilder, withAiMscoaGrounding, withFormSuggestions, withHttpMscoaAccounts, withHttpPipeline, withInputSecret, withRecipeSettings, withRouterFormId, withSpreadsheetImport };
|
|
8024
|
+
export type { AiEndpointCatalogEntry, AiEndpointCatalogProvider, AiEndpointCatalogSource, AiEndpointSlot, AiFormBuilderBudgets, AiFormBuilderConfig, AiFormBuilderModels, AiFormBuilderRole, AiMscoaAccountingBasis, AiMscoaGrounding, AiMscoaSegmentDescriptor, BlueprintField, BlueprintSlide, CheckFieldRecipeContext, CheckRecipeContext, ColumnChoice, DescribeOptions, DetectSourceContext, DistinctValue, DraftFailure, DraftFinding, DraftFindingKind, DraftFindingSeverity, DraftMessage, DraftMessageAuthor, DraftPartial, DraftRepairRoute, DraftRepairTurn, DraftRepairTurnKind, DraftRequestMiddleware, DraftSession, DraftStage, DraftTelemetry, EditableFieldError, EditableFieldKind, EditableFieldSchema, EditableFieldValidation, FieldDisplaySource, FieldFit, FieldSuggestion, FormBlueprint, FormBrief, FormBriefField, FormBriefRule, FormImportTemplateOptions, FormSuggestionChannel, FormSuggestionSnapshot, HttpMscoaAccountsOptions, ImportColumn, ImportColumnFill, ImportOptionAttribute, ImportOptionCondition, ImportOptionList, ImportOptionLists, ImportRecipeConflict, ImportRecipeStore, ImportRecipeWriteResult, ImportRunOptions, ImportRunState, ImportSheet, ImportTemplateOption, MatchColumn, MatchField, MatchReport, MscoaAccountAncestor, MscoaAccountDetail, MscoaAccountMapping, MscoaAccountMappings, MscoaAccountNode, MscoaAccountRecord, MscoaAccountSearchHit, MscoaAccountSearchMatch, MscoaAccountSearchOptions, MscoaAccountSearchResult, MscoaAccountSelection, MscoaChartPublication, MscoaChartSegment, MscoaCurrentSelection, MscoaFieldCapability, MscoaInnerInputDescriptor, MscoaResolvedPathAccount, MscoaSegmentDescriptor, MscoaSuggestionValue, MultipleRowSuggestionValue, OtherSavedMapping, ReportPlanPreview, ReportPlanPreviewFn, RowRuleAt, SourceIndex, SpreadsheetParser, SpreadsheetSheet, SpreadsheetSource, SpreadsheetTemplate, SpreadsheetTemplateSheet, SpreadsheetWriter, StagedSuggestion, SuggestionBatch, TemplateChoices, UniqueKeyOption };
|