ngx-t-forms 3.1.4 → 3.1.6
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-Bt7rWYJq.mjs → ngx-t-forms-api-endpoint-config.component-Di79aHfa.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-api-endpoint-config.component-Bt7rWYJq.mjs.map → ngx-t-forms-api-endpoint-config.component-Di79aHfa.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-IS266hPn.mjs → ngx-t-forms-auto-complete-input-element.component-DJ84laIO.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-IS266hPn.mjs.map → ngx-t-forms-auto-complete-input-element.component-DJ84laIO.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-BLcDBM6M.mjs → ngx-t-forms-basic-input-input-element.component-1wixvEKK.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-BLcDBM6M.mjs.map → ngx-t-forms-basic-input-input-element.component-1wixvEKK.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-BMheLioT.mjs → ngx-t-forms-calculated-field-rules.component-CMOyxJ4K.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-BMheLioT.mjs.map → ngx-t-forms-calculated-field-rules.component-CMOyxJ4K.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-mPoQRw0c.mjs → ngx-t-forms-chip-options-creator-editor.component-D2LhKaem.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-mPoQRw0c.mjs.map → ngx-t-forms-chip-options-creator-editor.component-D2LhKaem.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-conditional-display-config.component-Cw7Axzql.mjs → ngx-t-forms-conditional-display-config.component-DSyIhkWf.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-conditional-display-config.component-Cw7Axzql.mjs.map → ngx-t-forms-conditional-display-config.component-DSyIhkWf.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-Cacd0Sl8.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-DSUAcg8R.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-Cacd0Sl8.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-DSUAcg8R.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-data-source-picker.component-CwQgtKfU.mjs → ngx-t-forms-data-source-picker.component-h_e5wDIJ.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-data-source-picker.component-CwQgtKfU.mjs.map → ngx-t-forms-data-source-picker.component-h_e5wDIJ.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-OAnP4aVx.mjs → ngx-t-forms-date-picker-input-element.component-BPoqT0as.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-OAnP4aVx.mjs.map → ngx-t-forms-date-picker-input-element.component-BPoqT0as.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-DJVUs5xV.mjs → ngx-t-forms-date-range-picker-input-element.component-DLeCZF3n.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-DJVUs5xV.mjs.map → ngx-t-forms-date-range-picker-input-element.component-DLeCZF3n.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-time-picker-input-element.component-2Cq0ZEVD.mjs → ngx-t-forms-date-time-picker-input-element.component-D2kj-knT.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-time-picker-input-element.component-2Cq0ZEVD.mjs.map → ngx-t-forms-date-time-picker-input-element.component-D2kj-knT.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-CZ-XFrjM.mjs → ngx-t-forms-document-list-label-config-editor.component-BvQoKyeP.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-CZ-XFrjM.mjs.map → ngx-t-forms-document-list-label-config-editor.component-BvQoKyeP.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-document-picker.component-qzqg4O0I.mjs → ngx-t-forms-document-picker.component-D0hW0jUu.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-document-picker.component-qzqg4O0I.mjs.map → ngx-t-forms-document-picker.component-D0hW0jUu.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-editor-input-element.component-hf5qe7sH.mjs → ngx-t-forms-editor-input-element.component-DlIfYjsU.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-editor-input-element.component-hf5qe7sH.mjs.map → ngx-t-forms-editor-input-element.component-DlIfYjsU.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-s1pe3gKq.mjs → ngx-t-forms-file-upload-input-element.component-Dv21OQ8v.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-s1pe3gKq.mjs.map → ngx-t-forms-file-upload-input-element.component-Dv21OQ8v.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-input-selector.component-T3yqbRnV.mjs → ngx-t-forms-form-input-selector.component-HjtfeAew.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-input-selector.component-T3yqbRnV.mjs.map → ngx-t-forms-form-input-selector.component-HjtfeAew.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-D5AXKbXq.mjs → ngx-t-forms-form-json-view.component-XsTfLIOP.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-D5AXKbXq.mjs.map → ngx-t-forms-form-json-view.component-XsTfLIOP.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-5p9gBgjj.mjs → ngx-t-forms-form-section-stepper.component-DF3-s7Ou.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-5p9gBgjj.mjs.map → ngx-t-forms-form-section-stepper.component-DF3-s7Ou.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-DH4-vxBX.mjs → ngx-t-forms-forms-builder-menu.component-D_As34Ib.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-DH4-vxBX.mjs.map → ngx-t-forms-forms-builder-menu.component-D_As34Ib.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-geo-location.component-CaW4y8X1.mjs → ngx-t-forms-geo-location.component-BGg8uGQV.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-geo-location.component-CaW4y8X1.mjs.map → ngx-t-forms-geo-location.component-BGg8uGQV.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-header-template-editor.component-D9lka3Y5.mjs → ngx-t-forms-header-template-editor.component-D78_YC80.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-header-template-editor.component-D9lka3Y5.mjs.map → ngx-t-forms-header-template-editor.component-D78_YC80.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-Dt50q6pH.mjs → ngx-t-forms-image-capture-input-element.component-B2ldh1-n.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-Dt50q6pH.mjs.map → ngx-t-forms-image-capture-input-element.component-B2ldh1-n.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-index-CJwmJP3u.mjs → ngx-t-forms-index-CerXcX5U.mjs} +2 -2
- package/fesm2022/ngx-t-forms-index-CerXcX5U.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-custom.component-45DTVv-R.mjs → ngx-t-forms-input-custom.component-BrZ59sIz.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-input-custom.component-45DTVv-R.mjs.map → ngx-t-forms-input-custom.component-BrZ59sIz.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-input-editor.component-DNg-p_Wl.mjs → ngx-t-forms-input-editor.component-B5eMJWrz.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-input-editor.component-DNg-p_Wl.mjs.map → ngx-t-forms-input-editor.component-B5eMJWrz.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-DvrLH9wd.mjs → ngx-t-forms-map-mat-options-keys-BOX1dYlB.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-DvrLH9wd.mjs.map → ngx-t-forms-map-mat-options-keys-BOX1dYlB.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-1YdhWOqQ.mjs → ngx-t-forms-mat-chip-list-editor.component-lv4MlFT8.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-1YdhWOqQ.mjs.map → ngx-t-forms-mat-chip-list-editor.component-lv4MlFT8.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-P8CDm5nZ.mjs → ngx-t-forms-missing-form-configs.component-DV55dGC2.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-P8CDm5nZ.mjs.map → ngx-t-forms-missing-form-configs.component-DV55dGC2.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-Cj1zfMAW.mjs → ngx-t-forms-mscoa-chart-toolbar.component-C9hD1Cnq.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-Cj1zfMAW.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-C9hD1Cnq.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-config.component-CyG4Lafw.mjs → ngx-t-forms-mscoa-config.component-BqgTVHRS.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-mscoa-config.component-CyG4Lafw.mjs.map → ngx-t-forms-mscoa-config.component-BqgTVHRS.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-BcAgMwcV.mjs → ngx-t-forms-mscoa-segment-config.component-7w9J1RgE.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-BcAgMwcV.mjs.map → ngx-t-forms-mscoa-segment-config.component-7w9J1RgE.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BbbRpwPw.mjs +2336 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BbbRpwPw.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-D_PCGH-i.mjs → ngx-t-forms-ngx-t-forms-XLA9yzak.mjs} +1305 -143
- package/fesm2022/ngx-t-forms-ngx-t-forms-XLA9yzak.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-paginated-selection-table-B62XtkB5.mjs → ngx-t-forms-paginated-selection-table-DisWM3sL.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-paginated-selection-table-B62XtkB5.mjs.map → ngx-t-forms-paginated-selection-table-DisWM3sL.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-payload-template-editor.component-CY7BRHuw.mjs → ngx-t-forms-payload-template-editor.component-DM4-3jzA.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-payload-template-editor.component-CY7BRHuw.mjs.map → ngx-t-forms-payload-template-editor.component-DM4-3jzA.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-I2K-Csz3.mjs → ngx-t-forms-pipeline-generator.component-Bc8En673.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-I2K-Csz3.mjs.map → ngx-t-forms-pipeline-generator.component-Bc8En673.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-quill-input.component-BrOSKvq1.mjs → ngx-t-forms-quill-input.component-CN3aorpW.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-quill-input.component-BrOSKvq1.mjs.map → ngx-t-forms-quill-input.component-CN3aorpW.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-record-list-manager.component-BEeTQy5N.mjs → ngx-t-forms-record-list-manager.component-CpyrWNo5.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-record-list-manager.component-BEeTQy5N.mjs.map → ngx-t-forms-record-list-manager.component-CpyrWNo5.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-required-inputs.component-BUUrpNR0.mjs → ngx-t-forms-required-inputs.component-CtUXVAvg.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-required-inputs.component-BUUrpNR0.mjs.map → ngx-t-forms-required-inputs.component-CtUXVAvg.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-CJyrmfYU.mjs → ngx-t-forms-rest-api-call-setup.component-a4z2V-a1.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-CJyrmfYU.mjs.map → ngx-t-forms-rest-api-call-setup.component-a4z2V-a1.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-section-report.component-Dxecd1uL.mjs → ngx-t-forms-section-report.component-D-FE0aL3.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-section-report.component-Dxecd1uL.mjs.map → ngx-t-forms-section-report.component-D-FE0aL3.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-select-input-element.component-DPMSwCHF.mjs → ngx-t-forms-select-input-element.component-Bwlqr26x.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-select-input-element.component-DPMSwCHF.mjs.map → ngx-t-forms-select-input-element.component-Bwlqr26x.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-i0c0M02r.mjs → ngx-t-forms-selection-options-editor.component-BfaTlXQU.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-i0c0M02r.mjs.map → ngx-t-forms-selection-options-editor.component-BfaTlXQU.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-CZ5Zlcdy.mjs → ngx-t-forms-textarea-input-element.component-B35jrn-j.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-CZ5Zlcdy.mjs.map → ngx-t-forms-textarea-input-element.component-B35jrn-j.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-Cbnjjcv4.mjs → ngx-t-forms-toggle-input-element.component-Cku3HoDl.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-Cbnjjcv4.mjs.map → ngx-t-forms-toggle-input-element.component-Cku3HoDl.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-token-text-input.component-B0_C_BSx.mjs → ngx-t-forms-token-text-input.component-B1I95sk3.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-token-text-input.component-B0_C_BSx.mjs.map → ngx-t-forms-token-text-input.component-B1I95sk3.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-BvCwOCgs.mjs → ngx-t-forms-validators-config.component-yq3EGgU2.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-validators-config.component-BvCwOCgs.mjs.map → ngx-t-forms-validators-config.component-yq3EGgU2.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-DzE8_xCE.mjs → ngx-t-forms-workflow-adjudication.component-CZZX1hYU.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-DzE8_xCE.mjs.map → ngx-t-forms-workflow-adjudication.component-CZZX1hYU.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/package.json +2 -2
- package/types/ngx-t-forms.d.ts +484 -13
- package/fesm2022/ngx-t-forms-index-CJwmJP3u.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-DN25FtGd.mjs +0 -909
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-DN25FtGd.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-D_PCGH-i.mjs.map +0 -1
package/fesm2022/{ngx-t-forms-ngx-t-forms-D_PCGH-i.mjs → ngx-t-forms-ngx-t-forms-XLA9yzak.mjs}
RENAMED
|
@@ -281,6 +281,30 @@ const AI_ENDPOINT_CATALOG = new InjectionToken('AI_ENDPOINT_CATALOG');
|
|
|
281
281
|
*/
|
|
282
282
|
const AI_MSCOA_GROUNDING = new InjectionToken('AI_MSCOA_GROUNDING');
|
|
283
283
|
|
|
284
|
+
/**
|
|
285
|
+
* The host's spreadsheet parser — see {@link SpreadsheetParser}.
|
|
286
|
+
*
|
|
287
|
+
* Bound by `withSpreadsheetImport()`. Unbound by default: the library injects it
|
|
288
|
+
* optionally and keeps every "import from spreadsheet" affordance hidden until a
|
|
289
|
+
* parser exists, so an app that never opts in ships no import UI and carries no
|
|
290
|
+
* spreadsheet dependency on the library's account.
|
|
291
|
+
*
|
|
292
|
+
* @see provideNgxTForms
|
|
293
|
+
*/
|
|
294
|
+
const SPREADSHEET_PARSER = new InjectionToken('SPREADSHEET_PARSER');
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* The host's spreadsheet writer — see {@link SpreadsheetWriter}.
|
|
298
|
+
*
|
|
299
|
+
* Bound by `withSpreadsheetImport(parser, { writer })`. Unbound by default: the
|
|
300
|
+
* library injects it optionally, and every "download the import template"
|
|
301
|
+
* affordance stays hidden until a writer exists. A host that binds only a
|
|
302
|
+
* parser gets the import without the template.
|
|
303
|
+
*
|
|
304
|
+
* @see SPREADSHEET_PARSER
|
|
305
|
+
*/
|
|
306
|
+
const SPREADSHEET_WRITER = new InjectionToken('SPREADSHEET_WRITER');
|
|
307
|
+
|
|
284
308
|
/**
|
|
285
309
|
* Token binding the {@link DraftTransport} the AI form-builder pipeline drives.
|
|
286
310
|
*
|
|
@@ -2558,6 +2582,69 @@ const updateFormInputConfig = (self, inputId, config) => {
|
|
|
2558
2582
|
};
|
|
2559
2583
|
};
|
|
2560
2584
|
|
|
2585
|
+
/**
|
|
2586
|
+
* Returns `incoming` carrying exactly the `readonly` the author set on
|
|
2587
|
+
* `authored` — the engine's value is dropped, an authored one is restored.
|
|
2588
|
+
* Same reference back when nothing differs.
|
|
2589
|
+
*/
|
|
2590
|
+
function restoreReadonly(incoming, authored) {
|
|
2591
|
+
const authoredReadonly = authored?.readonly;
|
|
2592
|
+
if (incoming.readonly === authoredReadonly)
|
|
2593
|
+
return incoming;
|
|
2594
|
+
if (authoredReadonly === undefined) {
|
|
2595
|
+
const { readonly: _engineStamp, ...rest } = incoming;
|
|
2596
|
+
void _engineStamp;
|
|
2597
|
+
return rest;
|
|
2598
|
+
}
|
|
2599
|
+
return { ...incoming, readonly: authoredReadonly };
|
|
2600
|
+
}
|
|
2601
|
+
/**
|
|
2602
|
+
* Restores each incoming child's `readonly` from the authored child with the
|
|
2603
|
+
* same id. Same array reference back when no child changed.
|
|
2604
|
+
*/
|
|
2605
|
+
function restoreChildren(incoming, authored) {
|
|
2606
|
+
let changed = false;
|
|
2607
|
+
const next = incoming.map((child) => {
|
|
2608
|
+
const restored = restoreReadonly(child, authored?.find((candidate) => candidate.id === child.id));
|
|
2609
|
+
if (restored !== child)
|
|
2610
|
+
changed = true;
|
|
2611
|
+
return restored;
|
|
2612
|
+
});
|
|
2613
|
+
return changed ? next : incoming;
|
|
2614
|
+
}
|
|
2615
|
+
/**
|
|
2616
|
+
* Returns `incoming` with its `readonly` — and that of its MultipleInput row
|
|
2617
|
+
* fields and mSCOA inner inputs — taken from `authored` rather than from what
|
|
2618
|
+
* the engine reports.
|
|
2619
|
+
*
|
|
2620
|
+
* Mirrors the levels `markAutoComputedInputsReadonly` stamps, so nothing the
|
|
2621
|
+
* engine can stamp gets past it. Identity is preserved: an incoming config that
|
|
2622
|
+
* already agrees with the authored one at every level is returned as-is.
|
|
2623
|
+
*
|
|
2624
|
+
* @param incoming - The column as the engine reports it (its merged definition).
|
|
2625
|
+
* @param authored - The same column as the builder store holds it; `undefined`
|
|
2626
|
+
* when the store has no such column, in which case every stamp is dropped.
|
|
2627
|
+
* @returns `incoming`, carrying only authored `readonly` flags.
|
|
2628
|
+
*/
|
|
2629
|
+
function preserveAuthoredReadonly(incoming, authored) {
|
|
2630
|
+
let next = restoreReadonly(incoming, authored);
|
|
2631
|
+
const rowInputs = next.formInputs;
|
|
2632
|
+
if (rowInputs) {
|
|
2633
|
+
const restoredRows = restoreChildren(rowInputs, authored?.formInputs);
|
|
2634
|
+
if (restoredRows !== rowInputs)
|
|
2635
|
+
next = { ...next, formInputs: restoredRows };
|
|
2636
|
+
}
|
|
2637
|
+
const mscoaConfig = next.mscoaConfig;
|
|
2638
|
+
const innerInputs = mscoaConfig?.inputs;
|
|
2639
|
+
if (mscoaConfig && innerInputs) {
|
|
2640
|
+
const restoredInner = restoreChildren(innerInputs, authored?.mscoaConfig?.inputs);
|
|
2641
|
+
if (restoredInner !== innerInputs) {
|
|
2642
|
+
next = { ...next, mscoaConfig: { ...mscoaConfig, inputs: restoredInner } };
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
return next;
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2561
2648
|
const handleLoadFormListSuccess = (state, { forms }) => ({
|
|
2562
2649
|
...state,
|
|
2563
2650
|
forms: forms.map((form) => ({
|
|
@@ -2656,13 +2743,21 @@ const handleUpdateFormInputConfigFromTower = (state, { inputId, config }) => {
|
|
|
2656
2743
|
// engine's synced config always carries an empty `value`. Merging it would wipe
|
|
2657
2744
|
// a saved row default. Config syncs are about configuration, not user value —
|
|
2658
2745
|
// strip `value` so the value path (saveInputDefaultValue) stays authoritative.
|
|
2746
|
+
//
|
|
2747
|
+
// Nor are they about the engine's auto-computed read-only stamp: `initialize`
|
|
2748
|
+
// marks every calculated / fetched / inherited input `readonly: true` in the
|
|
2749
|
+
// engine's own definition, and that is what comes back here. Persisted, the
|
|
2750
|
+
// stamp reads as an authored `readonly`, which outranks the *Allow the user
|
|
2751
|
+
// to complete this value* opt-out — so the toggle would never unlock the
|
|
2752
|
+
// input again. The authored flag wins at every level the stamp reaches.
|
|
2659
2753
|
const configForMerge = (column) => {
|
|
2754
|
+
const synced = preserveAuthoredReadonly(config, column);
|
|
2660
2755
|
if (column.element === ElementTypes.MultipleInput) {
|
|
2661
|
-
const { value: _omitValue, ...rest } =
|
|
2756
|
+
const { value: _omitValue, ...rest } = synced;
|
|
2662
2757
|
void _omitValue;
|
|
2663
2758
|
return rest;
|
|
2664
2759
|
}
|
|
2665
|
-
return
|
|
2760
|
+
return synced;
|
|
2666
2761
|
};
|
|
2667
2762
|
const updatedForm = {
|
|
2668
2763
|
...currentForm,
|
|
@@ -2676,7 +2771,7 @@ const handleUpdateFormInputConfigFromTower = (state, { inputId, config }) => {
|
|
|
2676
2771
|
return {
|
|
2677
2772
|
...column,
|
|
2678
2773
|
formInputs: column.formInputs.map((input) => input.id === inputId || input.id === inputId.split('.')[1]
|
|
2679
|
-
? deepMerge(input, config)
|
|
2774
|
+
? deepMerge(input, preserveAuthoredReadonly(config, input))
|
|
2680
2775
|
: input)
|
|
2681
2776
|
};
|
|
2682
2777
|
}
|
|
@@ -2686,7 +2781,7 @@ const handleUpdateFormInputConfigFromTower = (state, { inputId, config }) => {
|
|
|
2686
2781
|
mscoaConfig: {
|
|
2687
2782
|
...column.mscoaConfig,
|
|
2688
2783
|
inputs: column.mscoaConfig.inputs.map((input) => input.id === inputId || input.id === inputId.split('.')[1]
|
|
2689
|
-
? deepMerge(input, config)
|
|
2784
|
+
? deepMerge(input, preserveAuthoredReadonly(config, input))
|
|
2690
2785
|
: input)
|
|
2691
2786
|
}
|
|
2692
2787
|
};
|
|
@@ -13779,6 +13874,452 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
13779
13874
|
args: [HttpClient]
|
|
13780
13875
|
}] }] });
|
|
13781
13876
|
|
|
13877
|
+
/**
|
|
13878
|
+
* @file Option-value resolution for imported choice cells.
|
|
13879
|
+
*
|
|
13880
|
+
* A spreadsheet cell bound for a choice field — a select, an autocomplete, a
|
|
13881
|
+
* paginated selection table — holds what the user SAW: an option's label, or
|
|
13882
|
+
* one of a table row's column values. The form stores the option's value,
|
|
13883
|
+
* which is often a system identifier the user never sees. These helpers turn
|
|
13884
|
+
* the text the user typed into the value the form stores, against the options
|
|
13885
|
+
* the form has loaded for the field:
|
|
13886
|
+
*
|
|
13887
|
+
* - a text equal to an option's stored value is that option — the value always
|
|
13888
|
+
* wins over a label, so a sheet exported from the system round-trips;
|
|
13889
|
+
* - a text equal to exactly one option's label (for a table: to a column value
|
|
13890
|
+
* of exactly one row) is that option;
|
|
13891
|
+
* - a text equal to several options' labels is a tie the user must break — it
|
|
13892
|
+
* is reported as an `ImportOptionChoice` so an import surface can offer the
|
|
13893
|
+
* candidates instead of failing the row;
|
|
13894
|
+
* - a text equal to nothing is unmatched. A strict field (select, table) treats
|
|
13895
|
+
* that as an error; a lenient one (autocomplete, which also takes free text)
|
|
13896
|
+
* keeps the text.
|
|
13897
|
+
*
|
|
13898
|
+
* Comparison is trimmed, whitespace-collapsed and case-insensitive.
|
|
13899
|
+
*
|
|
13900
|
+
* Angular-free, so it can be tested directly and reused by any import surface.
|
|
13901
|
+
*/
|
|
13902
|
+
/** Elements whose value must be one of their options. */
|
|
13903
|
+
const STRICT_OPTION_ELEMENTS = new Set([
|
|
13904
|
+
ElementTypes.Select,
|
|
13905
|
+
ElementTypes.IconSelect,
|
|
13906
|
+
ElementTypes.PaginatedSelectionTable,
|
|
13907
|
+
]);
|
|
13908
|
+
/** Elements whose options are suggestions — free text is a value too. */
|
|
13909
|
+
const LENIENT_OPTION_ELEMENTS = new Set([ElementTypes.AutoCompleteInput]);
|
|
13910
|
+
/** Table keys the paginated selection table never shows as data. */
|
|
13911
|
+
const TABLE_CONTROL_KEYS = new Set(['icons', 'actions']);
|
|
13912
|
+
/** Whether `input` is a choice field the resolver handles, and how strictly. */
|
|
13913
|
+
function optionInputKind(input) {
|
|
13914
|
+
if (STRICT_OPTION_ELEMENTS.has(input.element))
|
|
13915
|
+
return 'strict';
|
|
13916
|
+
if (LENIENT_OPTION_ELEMENTS.has(input.element))
|
|
13917
|
+
return 'lenient';
|
|
13918
|
+
return undefined;
|
|
13919
|
+
}
|
|
13920
|
+
/** Whether `input` stores a list of options rather than one. */
|
|
13921
|
+
function isMultiSelectInput(input) {
|
|
13922
|
+
return input.allowMultipleSelection === true;
|
|
13923
|
+
}
|
|
13924
|
+
/** `true` for a cell that holds nothing to resolve: `null`, `undefined`, blank text or an empty list. */
|
|
13925
|
+
function isBlankOptionCell(value) {
|
|
13926
|
+
if (value === null || value === undefined)
|
|
13927
|
+
return true;
|
|
13928
|
+
if (typeof value === 'string')
|
|
13929
|
+
return value.trim() === '';
|
|
13930
|
+
return Array.isArray(value) && value.length === 0;
|
|
13931
|
+
}
|
|
13932
|
+
/**
|
|
13933
|
+
* The comparison key of a text: trimmed, inner whitespace collapsed, case
|
|
13934
|
+
* folded. Numbers, booleans and dates compare by their text; anything else
|
|
13935
|
+
* (objects, lists) never matches.
|
|
13936
|
+
*/
|
|
13937
|
+
function normaliseOptionText(value) {
|
|
13938
|
+
const text = typeof value === 'string' ? value : textOf(value);
|
|
13939
|
+
return (text ?? '').trim().replace(/\s+/g, ' ').toLowerCase();
|
|
13940
|
+
}
|
|
13941
|
+
/**
|
|
13942
|
+
* Splits a multi-select cell into its values. Accepts a list as-is (each
|
|
13943
|
+
* entry as trimmed text), a JSON array, a comma-separated string, and a
|
|
13944
|
+
* bracketed comma-separated string that is not valid JSON. Anything else is
|
|
13945
|
+
* no values.
|
|
13946
|
+
*/
|
|
13947
|
+
function parseMultiSelectValues(raw) {
|
|
13948
|
+
if (Array.isArray(raw)) {
|
|
13949
|
+
return raw.map((v) => String(v).trim());
|
|
13950
|
+
}
|
|
13951
|
+
if (typeof raw !== 'string')
|
|
13952
|
+
return [];
|
|
13953
|
+
const trimmed = raw.trim();
|
|
13954
|
+
if (trimmed.startsWith('[') && trimmed.endsWith(']')) {
|
|
13955
|
+
try {
|
|
13956
|
+
const parsed = JSON.parse(trimmed);
|
|
13957
|
+
return Array.isArray(parsed) ? parsed.map((v) => String(v).trim()) : [String(parsed).trim()];
|
|
13958
|
+
}
|
|
13959
|
+
catch {
|
|
13960
|
+
// Malformed JSON array — strip brackets, split by comma, strip surrounding quotes.
|
|
13961
|
+
return trimmed
|
|
13962
|
+
.slice(1, -1)
|
|
13963
|
+
.split(',')
|
|
13964
|
+
.map((v) => v.trim().replace(/^["']|["']$/g, ''))
|
|
13965
|
+
.filter(Boolean);
|
|
13966
|
+
}
|
|
13967
|
+
}
|
|
13968
|
+
return trimmed.split(',').map((v) => v.trim()).filter(Boolean);
|
|
13969
|
+
}
|
|
13970
|
+
/**
|
|
13971
|
+
* The options of `input` as the resolver matches them, read from
|
|
13972
|
+
* `matOptions.options` — static, or as the form loaded them.
|
|
13973
|
+
*
|
|
13974
|
+
* A select option contributes its label (and, for user options, the user's
|
|
13975
|
+
* name and email). A paginated selection table row contributes the values of
|
|
13976
|
+
* the columns the table shows — those configured in
|
|
13977
|
+
* `paginationSelectionConfig.columns`, else every key of the rows — and its
|
|
13978
|
+
* identity is what the table stores: the `primaryIdentifierKey` path when one
|
|
13979
|
+
* is configured, else the row's `_id` or `id`. Options without a usable value
|
|
13980
|
+
* are skipped.
|
|
13981
|
+
*/
|
|
13982
|
+
function optionCandidates(input) {
|
|
13983
|
+
const options = input.matOptions?.options;
|
|
13984
|
+
if (!Array.isArray(options))
|
|
13985
|
+
return [];
|
|
13986
|
+
return input.element === ElementTypes.PaginatedSelectionTable
|
|
13987
|
+
? tableCandidates(input, options)
|
|
13988
|
+
: listCandidates(options);
|
|
13989
|
+
}
|
|
13990
|
+
function listCandidates(options) {
|
|
13991
|
+
const out = [];
|
|
13992
|
+
for (const option of options) {
|
|
13993
|
+
if (typeof option === 'string' || typeof option === 'number' || typeof option === 'boolean') {
|
|
13994
|
+
const text = String(option);
|
|
13995
|
+
out.push({ value: option, label: text, texts: [text] });
|
|
13996
|
+
continue;
|
|
13997
|
+
}
|
|
13998
|
+
if (!option || typeof option !== 'object' || Array.isArray(option))
|
|
13999
|
+
continue;
|
|
14000
|
+
const record = option;
|
|
14001
|
+
const value = record['value'];
|
|
14002
|
+
if (value === undefined || value === null)
|
|
14003
|
+
continue;
|
|
14004
|
+
const label = textOf(record['label']);
|
|
14005
|
+
const username = textOf(record['username']);
|
|
14006
|
+
const email = textOf(record['email']);
|
|
14007
|
+
const display = label ?? (username ? (email ? `${username} (${email})` : username) : String(value));
|
|
14008
|
+
out.push({ value, label: display, texts: unique([label, username, email]) });
|
|
14009
|
+
}
|
|
14010
|
+
return out;
|
|
14011
|
+
}
|
|
14012
|
+
function tableCandidates(input, rows) {
|
|
14013
|
+
const config = input.paginationSelectionConfig;
|
|
14014
|
+
const configured = (config?.columns ?? [])
|
|
14015
|
+
.map((column) => column?.key)
|
|
14016
|
+
.filter((key) => typeof key === 'string' && !TABLE_CONTROL_KEYS.has(key));
|
|
14017
|
+
const keys = configured.length > 0 ? configured : rowKeys(rows);
|
|
14018
|
+
const out = [];
|
|
14019
|
+
for (const row of rows) {
|
|
14020
|
+
if (!row || typeof row !== 'object' || Array.isArray(row))
|
|
14021
|
+
continue;
|
|
14022
|
+
const record = row;
|
|
14023
|
+
const identity = tableRowIdentity(config?.primaryIdentifierKey, record);
|
|
14024
|
+
if (identity === undefined || identity === null || identity === '')
|
|
14025
|
+
continue;
|
|
14026
|
+
const cells = keys.map((key) => textOf(record[key]));
|
|
14027
|
+
out.push({
|
|
14028
|
+
value: identity,
|
|
14029
|
+
label: cells.some(Boolean) ? cells.filter(isText).join(' · ') : String(identity),
|
|
14030
|
+
texts: unique([...cells, textOf(identity)]),
|
|
14031
|
+
});
|
|
14032
|
+
}
|
|
14033
|
+
return out;
|
|
14034
|
+
}
|
|
14035
|
+
/** Every data key the rows carry, in first-seen order. */
|
|
14036
|
+
function rowKeys(rows) {
|
|
14037
|
+
const keys = new Set();
|
|
14038
|
+
for (const row of rows) {
|
|
14039
|
+
if (!row || typeof row !== 'object' || Array.isArray(row))
|
|
14040
|
+
continue;
|
|
14041
|
+
for (const key of Object.keys(row)) {
|
|
14042
|
+
if (!TABLE_CONTROL_KEYS.has(key))
|
|
14043
|
+
keys.add(key);
|
|
14044
|
+
}
|
|
14045
|
+
}
|
|
14046
|
+
return [...keys];
|
|
14047
|
+
}
|
|
14048
|
+
/** What the paginated selection table stores for `row` — see its `getRowId`. */
|
|
14049
|
+
function tableRowIdentity(primaryIdentifierKey, row) {
|
|
14050
|
+
if (Array.isArray(primaryIdentifierKey) && primaryIdentifierKey.length > 0) {
|
|
14051
|
+
try {
|
|
14052
|
+
return returnMappedPathValue(primaryIdentifierKey, row);
|
|
14053
|
+
}
|
|
14054
|
+
catch {
|
|
14055
|
+
return undefined;
|
|
14056
|
+
}
|
|
14057
|
+
}
|
|
14058
|
+
if (typeof primaryIdentifierKey === 'string' && primaryIdentifierKey) {
|
|
14059
|
+
return row[primaryIdentifierKey];
|
|
14060
|
+
}
|
|
14061
|
+
return row['_id'] ?? row['id'];
|
|
14062
|
+
}
|
|
14063
|
+
/**
|
|
14064
|
+
* Matches one text against `candidates`: by stored value first, then by the
|
|
14065
|
+
* texts that name an option. Several candidates sharing one value count as one.
|
|
14066
|
+
*/
|
|
14067
|
+
function matchOptionText(text, candidates) {
|
|
14068
|
+
const key = normaliseOptionText(text);
|
|
14069
|
+
if (!key)
|
|
14070
|
+
return { kind: 'blank' };
|
|
14071
|
+
const byValue = candidates.find((candidate) => normaliseOptionText(candidate.value) === key);
|
|
14072
|
+
if (byValue)
|
|
14073
|
+
return { kind: 'value', value: byValue.value };
|
|
14074
|
+
const byText = distinctByValue(candidates.filter((candidate) => candidate.texts.some((t) => normaliseOptionText(t) === key)));
|
|
14075
|
+
const only = byText[0];
|
|
14076
|
+
if (byText.length === 1 && only)
|
|
14077
|
+
return { kind: 'label', value: only.value, label: only.label };
|
|
14078
|
+
if (byText.length > 1)
|
|
14079
|
+
return { kind: 'ambiguous', candidates: byText };
|
|
14080
|
+
return { kind: 'unmatched' };
|
|
14081
|
+
}
|
|
14082
|
+
/**
|
|
14083
|
+
* Resolves one cell against `candidates`: the single value of a select, or
|
|
14084
|
+
* every value of a multi-select cell (a list, or text
|
|
14085
|
+
* {@link parseMultiSelectValues} understands). A value that names an option is
|
|
14086
|
+
* replaced by the option's stored value — also when it already equals it but
|
|
14087
|
+
* differs in type or case, so what is stored is exactly what the form offers.
|
|
14088
|
+
*/
|
|
14089
|
+
function resolveOptionCell(current, candidates, field) {
|
|
14090
|
+
const entries = field.multi
|
|
14091
|
+
? Array.isArray(current) ? [...current] : parseMultiSelectValues(current)
|
|
14092
|
+
: [current];
|
|
14093
|
+
const resolved = [];
|
|
14094
|
+
const choices = [];
|
|
14095
|
+
const unmatched = [];
|
|
14096
|
+
let changed = false;
|
|
14097
|
+
for (const entry of entries) {
|
|
14098
|
+
const match = matchOptionText(entry, candidates);
|
|
14099
|
+
switch (match.kind) {
|
|
14100
|
+
case 'value':
|
|
14101
|
+
case 'label':
|
|
14102
|
+
resolved.push(match.value);
|
|
14103
|
+
if (!Object.is(match.value, entry))
|
|
14104
|
+
changed = true;
|
|
14105
|
+
break;
|
|
14106
|
+
case 'ambiguous':
|
|
14107
|
+
resolved.push(entry);
|
|
14108
|
+
choices.push({
|
|
14109
|
+
text: String(entry),
|
|
14110
|
+
candidates: match.candidates.map(({ value, label }) => ({ value, label })),
|
|
14111
|
+
});
|
|
14112
|
+
break;
|
|
14113
|
+
case 'unmatched':
|
|
14114
|
+
resolved.push(entry);
|
|
14115
|
+
if (field.kind === 'strict')
|
|
14116
|
+
unmatched.push(String(entry));
|
|
14117
|
+
break;
|
|
14118
|
+
default:
|
|
14119
|
+
resolved.push(entry);
|
|
14120
|
+
}
|
|
14121
|
+
}
|
|
14122
|
+
return {
|
|
14123
|
+
changed,
|
|
14124
|
+
value: changed ? (field.multi ? resolved : resolved[0]) : undefined,
|
|
14125
|
+
choices,
|
|
14126
|
+
unmatched,
|
|
14127
|
+
};
|
|
14128
|
+
}
|
|
14129
|
+
/**
|
|
14130
|
+
* Writes the user's pick for an ambiguous text back into a raw import row:
|
|
14131
|
+
* the cell becomes `value` for a single select; for a multi-select cell every
|
|
14132
|
+
* entry equal to `text` becomes `value` and the rest stand. Re-running the row
|
|
14133
|
+
* then resolves the pick by stored value, so it can never tie again.
|
|
14134
|
+
*/
|
|
14135
|
+
function applyOptionChoice(row, formControlName, text, value, multi) {
|
|
14136
|
+
if (!multi)
|
|
14137
|
+
return { ...row, [formControlName]: value };
|
|
14138
|
+
const current = row[formControlName];
|
|
14139
|
+
const entries = Array.isArray(current) ? [...current] : parseMultiSelectValues(current);
|
|
14140
|
+
const key = normaliseOptionText(text);
|
|
14141
|
+
return {
|
|
14142
|
+
...row,
|
|
14143
|
+
[formControlName]: entries.map((entry) => (normaliseOptionText(entry) === key ? value : entry)),
|
|
14144
|
+
};
|
|
14145
|
+
}
|
|
14146
|
+
/** The text of a primitive cell; `undefined` for blanks, objects and lists. */
|
|
14147
|
+
function textOf(value) {
|
|
14148
|
+
if (typeof value === 'string') {
|
|
14149
|
+
const trimmed = value.trim();
|
|
14150
|
+
return trimmed === '' ? undefined : trimmed;
|
|
14151
|
+
}
|
|
14152
|
+
if (typeof value === 'number')
|
|
14153
|
+
return Number.isFinite(value) ? String(value) : undefined;
|
|
14154
|
+
if (typeof value === 'boolean' || typeof value === 'bigint')
|
|
14155
|
+
return String(value);
|
|
14156
|
+
if (value instanceof Date)
|
|
14157
|
+
return Number.isNaN(value.getTime()) ? undefined : value.toISOString().slice(0, 10);
|
|
14158
|
+
return undefined;
|
|
14159
|
+
}
|
|
14160
|
+
const isText = (value) => typeof value === 'string';
|
|
14161
|
+
function unique(values) {
|
|
14162
|
+
return [...new Set(values.filter(isText))];
|
|
14163
|
+
}
|
|
14164
|
+
function distinctByValue(candidates) {
|
|
14165
|
+
const seen = new Set();
|
|
14166
|
+
const out = [];
|
|
14167
|
+
for (const candidate of candidates) {
|
|
14168
|
+
const key = normaliseOptionText(candidate.value) || `${String(candidate.value)}`;
|
|
14169
|
+
if (seen.has(key))
|
|
14170
|
+
continue;
|
|
14171
|
+
seen.add(key);
|
|
14172
|
+
out.push(candidate);
|
|
14173
|
+
}
|
|
14174
|
+
return out;
|
|
14175
|
+
}
|
|
14176
|
+
|
|
14177
|
+
/**
|
|
14178
|
+
* @file Row identity for duplicate detection in an import session.
|
|
14179
|
+
*
|
|
14180
|
+
* A session may be told which fields together identify a record
|
|
14181
|
+
* (`ImportIdentity.distinctKeys`). These helpers turn a row into the text its
|
|
14182
|
+
* identity is compared by, and decide which rows repeat an earlier one.
|
|
14183
|
+
*
|
|
14184
|
+
* Two identities are known for a row, at different times:
|
|
14185
|
+
*
|
|
14186
|
+
* - its RAW identity, from the row as the sheet carried it — known before the
|
|
14187
|
+
* row's tower is built, so a line pasted twice is set aside without paying
|
|
14188
|
+
* for a tower;
|
|
14189
|
+
* - its SETTLED identity, from the row's settled value — known only once the
|
|
14190
|
+
* tower has turned labels into stored values, codes into accounts and
|
|
14191
|
+
* inputs into calculations. This is the comparison that is actually right;
|
|
14192
|
+
* the raw one is the cheap case of it.
|
|
14193
|
+
*
|
|
14194
|
+
* Both use the comparison an option match uses ({@link normaliseOptionText}:
|
|
14195
|
+
* trimmed, whitespace collapsed, case folded), carried over to structured
|
|
14196
|
+
* values — an mSCOA account, a list of sub-rows — by canonicalising them:
|
|
14197
|
+
* members in key order, blank members dropped, the `id` minted for a list row
|
|
14198
|
+
* ignored. A raw cell that holds JSON is read as the value it encodes, and a
|
|
14199
|
+
* field the sheet carries as dotted sub-cells (`glAccount.accrual.FUND.debit`)
|
|
14200
|
+
* is gathered from them.
|
|
14201
|
+
*
|
|
14202
|
+
* Angular-free, so it can be tested directly.
|
|
14203
|
+
*/
|
|
14204
|
+
/**
|
|
14205
|
+
* The identity of a settled row whose key cells are all blank. A blank is
|
|
14206
|
+
* still a value once a row has settled — two rows blank in every key field
|
|
14207
|
+
* repeat each other — so such rows share this identity.
|
|
14208
|
+
*/
|
|
14209
|
+
const BLANK_IDENTITY = '[]';
|
|
14210
|
+
/**
|
|
14211
|
+
* The text a value's identity is compared by. Blank (`''`) for nothing at
|
|
14212
|
+
* all: `null`, `undefined`, whitespace, an empty list or object, or a
|
|
14213
|
+
* structure whose every member is blank.
|
|
14214
|
+
*
|
|
14215
|
+
* Text, numbers, booleans and dates compare as {@link normaliseOptionText}
|
|
14216
|
+
* does. A text that holds a JSON object or list compares as that value, so
|
|
14217
|
+
* spacing and member order do not tell two cells apart. A list compares
|
|
14218
|
+
* member by member, in order; a map by its members in key order, blank ones
|
|
14219
|
+
* left out. A map that is itself a row of a list — a multiple-input sub-row —
|
|
14220
|
+
* compares without its `id`, which the import mints for each row.
|
|
14221
|
+
*/
|
|
14222
|
+
function identityText(value) {
|
|
14223
|
+
const canonical = canonicalise(value, false);
|
|
14224
|
+
return typeof canonical === 'string' ? canonical : JSON.stringify(canonical);
|
|
14225
|
+
}
|
|
14226
|
+
/**
|
|
14227
|
+
* The identity of a row over `keys`: the identity text of each key's cell,
|
|
14228
|
+
* in key order. `undefined` when every cell is blank — the row carries no
|
|
14229
|
+
* identity of its own, and only its settled value can be judged.
|
|
14230
|
+
*
|
|
14231
|
+
* A key's cell is `row[key]`. When the row carries the field as dotted
|
|
14232
|
+
* sub-cells instead — `glAccount.accrual.FUND.debit`, the way a sheet holds
|
|
14233
|
+
* an mSCOA account — those are gathered under their suffixes and compared
|
|
14234
|
+
* together.
|
|
14235
|
+
*/
|
|
14236
|
+
function rowIdentityKey(row, keys) {
|
|
14237
|
+
if (!row)
|
|
14238
|
+
return undefined;
|
|
14239
|
+
const parts = keys.map((key) => identityText(fieldCell(row, key)));
|
|
14240
|
+
return parts.every((part) => part === '') ? undefined : JSON.stringify(parts);
|
|
14241
|
+
}
|
|
14242
|
+
/**
|
|
14243
|
+
* For each row, the index of the earlier row it repeats, or `undefined` for a
|
|
14244
|
+
* row that stands on its own.
|
|
14245
|
+
*
|
|
14246
|
+
* First wins: the lowest index of a group of matching rows is the original,
|
|
14247
|
+
* and every later match names it. A row repeats an earlier one when its raw
|
|
14248
|
+
* identity equals that row's raw identity, or its settled identity equals
|
|
14249
|
+
* that row's settled identity. A duplicate's own identities are credited to
|
|
14250
|
+
* its original, so a row that repeats a duplicate is named after the original
|
|
14251
|
+
* — and is caught on its raw identity even when the duplicate was only
|
|
14252
|
+
* recognised once settled.
|
|
14253
|
+
*/
|
|
14254
|
+
function assignDuplicates(rows) {
|
|
14255
|
+
const byRaw = new Map();
|
|
14256
|
+
const bySettled = new Map();
|
|
14257
|
+
return rows.map((row, index) => {
|
|
14258
|
+
let original = row.raw === undefined ? undefined : byRaw.get(row.raw);
|
|
14259
|
+
if (original === undefined && row.settled !== undefined)
|
|
14260
|
+
original = bySettled.get(row.settled);
|
|
14261
|
+
const group = original ?? index;
|
|
14262
|
+
if (row.raw !== undefined && !byRaw.has(row.raw))
|
|
14263
|
+
byRaw.set(row.raw, group);
|
|
14264
|
+
if (row.settled !== undefined && !bySettled.has(row.settled))
|
|
14265
|
+
bySettled.set(row.settled, group);
|
|
14266
|
+
return original;
|
|
14267
|
+
});
|
|
14268
|
+
}
|
|
14269
|
+
/** `row[key]`, or the row's dotted sub-cells of `key` gathered under their suffixes. */
|
|
14270
|
+
function fieldCell(row, key) {
|
|
14271
|
+
const prefix = `${key}.`;
|
|
14272
|
+
const gathered = {};
|
|
14273
|
+
let found = false;
|
|
14274
|
+
for (const [name, value] of Object.entries(row)) {
|
|
14275
|
+
if (name.length > prefix.length && name.startsWith(prefix)) {
|
|
14276
|
+
gathered[name.slice(prefix.length)] = value;
|
|
14277
|
+
found = true;
|
|
14278
|
+
}
|
|
14279
|
+
}
|
|
14280
|
+
if (!found)
|
|
14281
|
+
return row[key];
|
|
14282
|
+
if (row[key] !== undefined)
|
|
14283
|
+
gathered[''] = row[key];
|
|
14284
|
+
return gathered;
|
|
14285
|
+
}
|
|
14286
|
+
function canonicalise(value, isListRow) {
|
|
14287
|
+
if (typeof value === 'string') {
|
|
14288
|
+
const encoded = parseJsonCell(value);
|
|
14289
|
+
return encoded === undefined ? normaliseOptionText(value) : canonicalise(encoded, isListRow);
|
|
14290
|
+
}
|
|
14291
|
+
if (Array.isArray(value)) {
|
|
14292
|
+
const items = value.map((item) => canonicalise(item, true));
|
|
14293
|
+
return items.every((item) => item === '') ? '' : items;
|
|
14294
|
+
}
|
|
14295
|
+
if (value !== null && typeof value === 'object' && !(value instanceof Date)) {
|
|
14296
|
+
const members = value;
|
|
14297
|
+
const out = {};
|
|
14298
|
+
for (const key of Object.keys(members).sort()) {
|
|
14299
|
+
if (isListRow && key === 'id')
|
|
14300
|
+
continue;
|
|
14301
|
+
const member = canonicalise(members[key], false);
|
|
14302
|
+
if (member !== '')
|
|
14303
|
+
out[key] = member;
|
|
14304
|
+
}
|
|
14305
|
+
return Object.keys(out).length === 0 ? '' : out;
|
|
14306
|
+
}
|
|
14307
|
+
return normaliseOptionText(value);
|
|
14308
|
+
}
|
|
14309
|
+
/** The object or list a text encodes as JSON, else `undefined`. */
|
|
14310
|
+
function parseJsonCell(text) {
|
|
14311
|
+
const trimmed = text.trim();
|
|
14312
|
+
if (!trimmed.startsWith('[') && !trimmed.startsWith('{'))
|
|
14313
|
+
return undefined;
|
|
14314
|
+
try {
|
|
14315
|
+
const parsed = JSON.parse(trimmed);
|
|
14316
|
+
return parsed !== null && typeof parsed === 'object' ? parsed : undefined;
|
|
14317
|
+
}
|
|
14318
|
+
catch {
|
|
14319
|
+
return undefined;
|
|
14320
|
+
}
|
|
14321
|
+
}
|
|
14322
|
+
|
|
13782
14323
|
/**
|
|
13783
14324
|
* @file Form Import Controller — drives a bulk import session by spinning up
|
|
13784
14325
|
* one isolated {@link FormTowerControllerService} instance per row and
|
|
@@ -13787,7 +14328,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
13787
14328
|
*
|
|
13788
14329
|
* **Mental model for one row:**
|
|
13789
14330
|
* ```
|
|
13790
|
-
* rawRow ─►
|
|
14331
|
+
* rawRow ─► raw identity repeats an earlier row? ─► 'duplicate', no tower (ImportIdentity)
|
|
14332
|
+
* │
|
|
14333
|
+
* ▼
|
|
14334
|
+
* _preProcessRow (resolves SCOA codes, multi-selects, sub-rows)
|
|
13791
14335
|
* │
|
|
13792
14336
|
* ▼
|
|
13793
14337
|
* _createTower (child injector, cache-aware http fns)
|
|
@@ -13802,10 +14346,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
13802
14346
|
* waitUntilSettled ←── all async derivations drained (deterministic)
|
|
13803
14347
|
* │
|
|
13804
14348
|
* ▼
|
|
14349
|
+
* _resolveOptionValues ←── choice cells: label → stored value (re-settles on a swap)
|
|
14350
|
+
* │
|
|
14351
|
+
* ▼
|
|
13805
14352
|
* getFormValueNames + collectValidationErrors + collectColErrors
|
|
13806
14353
|
* │
|
|
13807
14354
|
* ▼
|
|
13808
14355
|
* ImportRowState { status, settledValue, isValid, validationErrors, colErrors }
|
|
14356
|
+
* │
|
|
14357
|
+
* ▼
|
|
14358
|
+
* settled identity repeats an earlier row? ─► 'duplicate' (settled value and errors kept)
|
|
13809
14359
|
* ```
|
|
13810
14360
|
*
|
|
13811
14361
|
* **Concurrency strategy:** rows are processed **sequentially** (one tower at a
|
|
@@ -13828,6 +14378,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
13828
14378
|
* documented no-op and is no longer passed. Validation is still recomputed
|
|
13829
14379
|
* explicitly after settle — see {@link TFormImportController._recomputeAllValidationErrors}.
|
|
13830
14380
|
*/
|
|
14381
|
+
/**
|
|
14382
|
+
* Most times a row's choice cells are matched against their options. Every
|
|
14383
|
+
* pass after the first follows a substitution that may have re-fetched a
|
|
14384
|
+
* dependent option list; a chain of selects three deep is beyond any real form.
|
|
14385
|
+
*/
|
|
14386
|
+
const MAX_OPTION_PASSES = 4;
|
|
13831
14387
|
// ---------------------------------------------------------------------------
|
|
13832
14388
|
// Service
|
|
13833
14389
|
// ---------------------------------------------------------------------------
|
|
@@ -13888,6 +14444,30 @@ class TFormImportController {
|
|
|
13888
14444
|
* tower's child injector that returns this shared observable instead.
|
|
13889
14445
|
*/
|
|
13890
14446
|
this._financialCycles$ = null;
|
|
14447
|
+
/**
|
|
14448
|
+
* The field of the multiple-input session most recently started by
|
|
14449
|
+
* {@link runMultipleInputImport}, so {@link rerunMultipleInputRow} can
|
|
14450
|
+
* re-check one of its rows against the same per-field context. Cleared by
|
|
14451
|
+
* a bulk run and by {@link reset}.
|
|
14452
|
+
*/
|
|
14453
|
+
this._multipleInputSession = null;
|
|
14454
|
+
/**
|
|
14455
|
+
* The form of the bulk session most recently started by {@link runImport},
|
|
14456
|
+
* so {@link rerunImportRow} can re-check one of its rows the same way.
|
|
14457
|
+
* Cleared by a multiple-input run and by {@link reset}.
|
|
14458
|
+
*/
|
|
14459
|
+
this._bulkSession = null;
|
|
14460
|
+
/**
|
|
14461
|
+
* Duplicate detection for the current session, or `null` when the run was
|
|
14462
|
+
* given no {@link ImportIdentity}. Set by both run methods; cleared by
|
|
14463
|
+
* {@link reset}.
|
|
14464
|
+
*/
|
|
14465
|
+
this._identity = null;
|
|
14466
|
+
/**
|
|
14467
|
+
* Each processed row's own verdict, keyed by row index. Reporting a row as a
|
|
14468
|
+
* duplicate overlays its status; this is what a release restores.
|
|
14469
|
+
*/
|
|
14470
|
+
this._verdicts = new Map();
|
|
13891
14471
|
/**
|
|
13892
14472
|
* Reactive progress stream — subscribe to track each row in real time.
|
|
13893
14473
|
*/
|
|
@@ -13916,34 +14496,40 @@ class TFormImportController {
|
|
|
13916
14496
|
* const valid = results.filter(r => r.isValid);
|
|
13917
14497
|
* ```
|
|
13918
14498
|
*
|
|
14499
|
+
* With an `identity`, a row that repeats an earlier row on the named fields
|
|
14500
|
+
* is held as its duplicate — `status: 'duplicate'`, `duplicateOf` naming
|
|
14501
|
+
* the earlier row — and, under the default `skip` policy, never gets a
|
|
14502
|
+
* tower when the sheet already shows the repeat. A repeat that only shows
|
|
14503
|
+
* once labels and codes have resolved is recognised after the row settles.
|
|
14504
|
+
* Rejects, before any state changes, when a key is not a `formControlName`
|
|
14505
|
+
* of the form.
|
|
14506
|
+
*
|
|
13919
14507
|
* @param form The form definition every row is validated against.
|
|
13920
14508
|
* @param rows Raw data objects — one per import row.
|
|
14509
|
+
* @param identity Which fields identify a record, and what to do with a
|
|
14510
|
+
* duplicate. Absent, or with no keys: every row stands on its own.
|
|
14511
|
+
*
|
|
14512
|
+
* @example
|
|
14513
|
+
* const results = await importController.runImport(form, rows, { distinctKeys: ['supplierRef', 'invoiceNo'] });
|
|
14514
|
+
* const repeats = results.filter(r => r.status === 'duplicate'); // r.duplicateOf names the row each repeats
|
|
13921
14515
|
*/
|
|
13922
|
-
async runImport(form, rows) {
|
|
14516
|
+
async runImport(form, rows, identity) {
|
|
14517
|
+
// A key the form does not have is refused before the previous session is touched.
|
|
14518
|
+
const identitySession = this._identitySession(identity, this._formControlNames(form));
|
|
13923
14519
|
// Fresh cache per session — previous responses must not bleed into a new run.
|
|
13924
14520
|
this._getCache.clear();
|
|
13925
14521
|
this._postCache.clear();
|
|
13926
14522
|
this._financialCycles$ = null;
|
|
14523
|
+
this._multipleInputSession = null;
|
|
14524
|
+
this._identity = identitySession;
|
|
14525
|
+
this._verdicts.clear();
|
|
13927
14526
|
this._rows$.next(rows.map((originalData, rowIndex) => ({ rowIndex, originalData, status: 'pending' })));
|
|
13928
14527
|
const hasPreProcessInputs = form.slides.some(slide => slide.columns.some(col => this._inputPreProcessors.has(col.element)));
|
|
14528
|
+
this._bulkSession = { form, hasPreProcessInputs };
|
|
14529
|
+
// A row the sheet already repeats is known now, before any tower is built.
|
|
14530
|
+
this._reconcileDuplicates();
|
|
13929
14531
|
try {
|
|
13930
|
-
|
|
13931
|
-
// own tower whose settle (`waitUntilSettled`) and FormGroup projection rely
|
|
13932
|
-
// on `ApplicationRef.tick()`-driven effect flushes over the application's
|
|
13933
|
-
// single shared `ApplicationRef`. Running every row concurrently makes those
|
|
13934
|
-
// ticks interleave across towers, so `waitUntilSettled` resolves on a
|
|
13935
|
-
// spurious `settled === true` (value resources still `idle`, not yet
|
|
13936
|
-
// `loading`) before a row's derived values have drained and projected —
|
|
13937
|
-
// leaving most rows with empty API-derived fields (objectives/nKPA/etc.).
|
|
13938
|
-
// The per-session HTTP caches (`_getCache`/`_postCache`/`_financialCycles$`)
|
|
13939
|
-
// still dedupe identical requests across rows, so sequential processing
|
|
13940
|
-
// reuses the same network calls without the race.
|
|
13941
|
-
for (let i = 0; i < rows.length; i++) {
|
|
13942
|
-
const row = rows[i];
|
|
13943
|
-
if (!row)
|
|
13944
|
-
continue;
|
|
13945
|
-
await this._processRow(form, row, i, hasPreProcessInputs);
|
|
13946
|
-
}
|
|
14532
|
+
await this._runQueued((rowIndex, row) => this._processRow(form, row, rowIndex, hasPreProcessInputs));
|
|
13947
14533
|
}
|
|
13948
14534
|
finally {
|
|
13949
14535
|
// Always release cached Observables — even if an unexpected error escapes
|
|
@@ -13954,13 +14540,173 @@ class TFormImportController {
|
|
|
13954
14540
|
}
|
|
13955
14541
|
return this._rows$.value;
|
|
13956
14542
|
}
|
|
14543
|
+
/**
|
|
14544
|
+
* Validates rows for ONE multiple-input field, each as its own
|
|
14545
|
+
* {@link ImportRowState}.
|
|
14546
|
+
*
|
|
14547
|
+
* Every row runs through the same per-row tower the bulk path uses for a
|
|
14548
|
+
* MultipleInput's sub-rows ({@link _processMultipleFormInput}): the field's
|
|
14549
|
+
* children are hoisted into a one-slide form, pre-processors resolve mSCOA
|
|
14550
|
+
* codes and multi-selects, calculations and API fetches settle, and the
|
|
14551
|
+
* settled errors are partitioned into blocking / overridable. What differs is
|
|
14552
|
+
* the reporting — a bulk import folds sub-row errors onto the parent row as
|
|
14553
|
+
* `"[i].field.error"`; here each row is reported on its own, with
|
|
14554
|
+
* `settledValue` keyed by child `formControlName` (plus `id`) and
|
|
14555
|
+
* `colErrors` keyed the same way, so a spreadsheet import can show errors
|
|
14556
|
+
* against the user's own column headers. `validationErrors` /
|
|
14557
|
+
* `overridableErrors` stay keyed by input id, as for a bulk row.
|
|
14558
|
+
*
|
|
14559
|
+
* A choice cell (select, autocomplete, paginated selection table) may hold
|
|
14560
|
+
* the option as the user saw it — its label, or one of a table row's column
|
|
14561
|
+
* values — instead of the value the form stores; once the options have
|
|
14562
|
+
* loaded, the cell is swapped for the stored value. A text that fits several
|
|
14563
|
+
* options is reported in {@link ImportRowState.optionChoices} for the user
|
|
14564
|
+
* to settle through {@link rerunMultipleInputRow}.
|
|
14565
|
+
*
|
|
14566
|
+
* Drives the same `progress$` stream and per-session HTTP caches as
|
|
14567
|
+
* {@link runImport}; the two are not meant to run concurrently.
|
|
14568
|
+
*
|
|
14569
|
+
* Duplicate rows are recognised exactly as in {@link runImport}, with
|
|
14570
|
+
* `identity.distinctKeys` naming the children's `formControlName`s.
|
|
14571
|
+
*
|
|
14572
|
+
* @param input - The MultipleInput column whose `formInputs` define a row.
|
|
14573
|
+
* @param rows - Raw rows keyed by child `formControlName` — one object per row.
|
|
14574
|
+
* @param identity - Which children identify a row, and what to do with a
|
|
14575
|
+
* duplicate. Absent, or with no keys: every row stands on its own.
|
|
14576
|
+
*
|
|
14577
|
+
* @example
|
|
14578
|
+
* const states = await importCtrl.runMultipleInputImport(linesColumn, rows, { distinctKeys: ['item'] });
|
|
14579
|
+
* const ready = states.filter(s => s.status === 'valid').map(s => s.settledValue);
|
|
14580
|
+
*/
|
|
14581
|
+
async runMultipleInputImport(input, rows, identity) {
|
|
14582
|
+
// A key the field does not have is refused before the previous session is touched.
|
|
14583
|
+
const identitySession = this._identitySession(identity, this._childControlNames(input));
|
|
14584
|
+
// Fresh cache per session — previous responses must not bleed into a new run.
|
|
14585
|
+
this._getCache.clear();
|
|
14586
|
+
this._postCache.clear();
|
|
14587
|
+
this._financialCycles$ = null;
|
|
14588
|
+
this._identity = identitySession;
|
|
14589
|
+
this._verdicts.clear();
|
|
14590
|
+
this._rows$.next(rows.map((originalData, rowIndex) => ({ rowIndex, originalData, status: 'pending' })));
|
|
14591
|
+
const context = this._multipleInputContext(input);
|
|
14592
|
+
this._bulkSession = null;
|
|
14593
|
+
this._multipleInputSession = { input, context };
|
|
14594
|
+
this._reconcileDuplicates();
|
|
14595
|
+
try {
|
|
14596
|
+
await this._runQueued((rowIndex, row) => this._processMultipleInputRow(context, row, rowIndex));
|
|
14597
|
+
}
|
|
14598
|
+
finally {
|
|
14599
|
+
this._getCache.clear();
|
|
14600
|
+
this._postCache.clear();
|
|
14601
|
+
this._financialCycles$ = null;
|
|
14602
|
+
}
|
|
14603
|
+
return this._rows$.value;
|
|
14604
|
+
}
|
|
14605
|
+
/**
|
|
14606
|
+
* Re-checks ONE row of the bulk session the last {@link runImport} started —
|
|
14607
|
+
* after the user settled an ambiguous option reported in
|
|
14608
|
+
* {@link ImportRowState.optionChoices}, say — and reports it in place: the
|
|
14609
|
+
* row's `originalData` becomes `row`, its state passes through `processing`
|
|
14610
|
+
* to its new outcome on `progress$`, and every other row stands. The
|
|
14611
|
+
* per-session HTTP caches are cold by then, so the row's own fetches run
|
|
14612
|
+
* again.
|
|
14613
|
+
*
|
|
14614
|
+
* When the session was given an {@link ImportIdentity}, the duplicate
|
|
14615
|
+
* relation is a fact about the session, not the row, and is re-evaluated:
|
|
14616
|
+
* the row may now repeat an earlier row (and is held as its duplicate —
|
|
14617
|
+
* without a tower, under `skip` — when the repeat shows in the raw data),
|
|
14618
|
+
* and rows that repeated it may be released back to their own verdicts.
|
|
14619
|
+
* A released row that was never processed is processed now, before this
|
|
14620
|
+
* resolves. Only rows after `rowIndex` can be affected.
|
|
14621
|
+
*
|
|
14622
|
+
* Rejects when no bulk session holds `rowIndex` (none was run, a
|
|
14623
|
+
* multiple-input run or {@link reset} has since cleared it, or the index is
|
|
14624
|
+
* out of range).
|
|
14625
|
+
*
|
|
14626
|
+
* @param rowIndex - The row's position in the session (`ImportRowState.rowIndex`).
|
|
14627
|
+
* @param row - The row to check, keyed by `formControlName` like the original.
|
|
14628
|
+
* @returns The row's new state.
|
|
14629
|
+
*
|
|
14630
|
+
* @example
|
|
14631
|
+
* // The user picked `pick` for the text `choice.text` of column `key`.
|
|
14632
|
+
* const fixed = applyOptionChoice(state.originalData, key, choice.text, pick.value, false);
|
|
14633
|
+
* const next = await importCtrl.rerunImportRow(state.rowIndex, fixed);
|
|
14634
|
+
*/
|
|
14635
|
+
async rerunImportRow(rowIndex, row) {
|
|
14636
|
+
const session = this._bulkSession;
|
|
14637
|
+
if (!session || !this._rows$.value[rowIndex]) {
|
|
14638
|
+
throw new Error(`No bulk import session holds row ${rowIndex}.`);
|
|
14639
|
+
}
|
|
14640
|
+
this._requeueRow(rowIndex, row);
|
|
14641
|
+
await this._runQueued((i, data) => this._processRow(session.form, data, i, session.hasPreProcessInputs));
|
|
14642
|
+
const next = this._rows$.value[rowIndex];
|
|
14643
|
+
if (!next) {
|
|
14644
|
+
throw new Error(`Row ${rowIndex} was cleared while it was being re-checked.`);
|
|
14645
|
+
}
|
|
14646
|
+
return next;
|
|
14647
|
+
}
|
|
14648
|
+
/**
|
|
14649
|
+
* Re-checks ONE row of the multiple-input session the last
|
|
14650
|
+
* {@link runMultipleInputImport} started — after the user settled an
|
|
14651
|
+
* ambiguous option reported in {@link ImportRowState.optionChoices}, say —
|
|
14652
|
+
* and reports it in place: the row's `originalData` becomes `row`, its state
|
|
14653
|
+
* passes through `processing` to its new outcome on `progress$`, and every
|
|
14654
|
+
* other row stands.
|
|
14655
|
+
*
|
|
14656
|
+
* Duplicates are re-evaluated exactly as {@link rerunImportRow} describes.
|
|
14657
|
+
*
|
|
14658
|
+
* Rejects when no multiple-input session holds `rowIndex` (none was run, a
|
|
14659
|
+
* bulk run or {@link reset} has since cleared it, or the index is out of
|
|
14660
|
+
* range).
|
|
14661
|
+
*
|
|
14662
|
+
* @param rowIndex - The row's position in the session (`ImportRowState.rowIndex`).
|
|
14663
|
+
* @param row - The row to check, keyed by child `formControlName` like the original.
|
|
14664
|
+
* @returns The row's new state.
|
|
14665
|
+
*
|
|
14666
|
+
* @example
|
|
14667
|
+
* // The user picked candidate `pick` for the text `choice.text` of column `key`.
|
|
14668
|
+
* const fixed = { ...state.originalData, [key]: pick.value };
|
|
14669
|
+
* const next = await importCtrl.rerunMultipleInputRow(state.rowIndex, fixed);
|
|
14670
|
+
*/
|
|
14671
|
+
async rerunMultipleInputRow(rowIndex, row) {
|
|
14672
|
+
const session = this._multipleInputSession;
|
|
14673
|
+
if (!session || !this._rows$.value[rowIndex]) {
|
|
14674
|
+
throw new Error(`No multiple-input import session holds row ${rowIndex}.`);
|
|
14675
|
+
}
|
|
14676
|
+
this._requeueRow(rowIndex, row);
|
|
14677
|
+
await this._runQueued((i, data) => this._processMultipleInputRow(session.context, data, i));
|
|
14678
|
+
const next = this._rows$.value[rowIndex];
|
|
14679
|
+
if (!next) {
|
|
14680
|
+
throw new Error(`Row ${rowIndex} was cleared while it was being re-checked.`);
|
|
14681
|
+
}
|
|
14682
|
+
return next;
|
|
14683
|
+
}
|
|
13957
14684
|
/** Clears all row state. */
|
|
13958
14685
|
reset() {
|
|
13959
14686
|
this._getCache.clear();
|
|
13960
14687
|
this._postCache.clear();
|
|
13961
14688
|
this._financialCycles$ = null;
|
|
14689
|
+
this._bulkSession = null;
|
|
14690
|
+
this._multipleInputSession = null;
|
|
14691
|
+
this._identity = null;
|
|
14692
|
+
this._verdicts.clear();
|
|
13962
14693
|
this._rows$.next([]);
|
|
13963
14694
|
}
|
|
14695
|
+
/** The patch that queues a row again with `row` as its data and every earlier outcome cleared. */
|
|
14696
|
+
_freshRowPatch(row) {
|
|
14697
|
+
return {
|
|
14698
|
+
originalData: row,
|
|
14699
|
+
status: 'pending',
|
|
14700
|
+
settledValue: undefined,
|
|
14701
|
+
isValid: undefined,
|
|
14702
|
+
validationErrors: undefined,
|
|
14703
|
+
overridableErrors: undefined,
|
|
14704
|
+
colErrors: undefined,
|
|
14705
|
+
errorMessage: undefined,
|
|
14706
|
+
optionChoices: undefined,
|
|
14707
|
+
duplicateOf: undefined,
|
|
14708
|
+
};
|
|
14709
|
+
}
|
|
13964
14710
|
// -------------------------------------------------------------------------
|
|
13965
14711
|
// Private
|
|
13966
14712
|
// -------------------------------------------------------------------------
|
|
@@ -14083,6 +14829,11 @@ class TFormImportController {
|
|
|
14083
14829
|
// The signal-graph engine settles deterministically, so this is a defined
|
|
14084
14830
|
// boundary — not the old 500ms changeMonitor debounce race.
|
|
14085
14831
|
await tower.waitUntilSettled();
|
|
14832
|
+
// Choice cells may hold what the user SAW (an option's label, a table
|
|
14833
|
+
// row's column value) rather than what the form stores. The options have
|
|
14834
|
+
// loaded now: swap those cells for the stored values, settling again
|
|
14835
|
+
// whenever a swap can change what a dependent list fetches.
|
|
14836
|
+
const optionOutcome = await this._resolveOptionValues(tower, resolvedRowData, Object.keys(preColErrors));
|
|
14086
14837
|
// Recompute control.errors across the whole tree so cross-field custom
|
|
14087
14838
|
// validators (which read getFormValue() over OTHER fields) and disabled
|
|
14088
14839
|
// controls are validated against the settled values — see
|
|
@@ -14107,7 +14858,7 @@ class TFormImportController {
|
|
|
14107
14858
|
settledValue[fcn] = this._deepMergePreferTower(importVal, settledValue[fcn]);
|
|
14108
14859
|
}
|
|
14109
14860
|
const validationErrors = this._collectValidationErrors(tower);
|
|
14110
|
-
const colErrors = { ...this._collectColErrors(tower), ...preColErrors };
|
|
14861
|
+
const colErrors = { ...this._collectColErrors(tower), ...preColErrors, ...optionOutcome.colErrors };
|
|
14111
14862
|
// Partition the settled errors so a row whose only remaining failures are
|
|
14112
14863
|
// overridable (canOverride === true) is flagged 'overridable' rather than
|
|
14113
14864
|
// hard 'invalid'. Pre-process errors are always blocking.
|
|
@@ -14118,7 +14869,8 @@ class TFormImportController {
|
|
|
14118
14869
|
for (const [inputId, msgs] of Object.entries(preOverridable)) {
|
|
14119
14870
|
(overridableErrors[inputId] ??= []).push(...msgs);
|
|
14120
14871
|
}
|
|
14121
|
-
|
|
14872
|
+
// A choice cell that names several options, or none, blocks like a pre-process error.
|
|
14873
|
+
const hasPreErrors = Object.keys(preColErrors).length > 0 || Object.keys(optionOutcome.colErrors).length > 0;
|
|
14122
14874
|
const hasBlocking = blocking.length > 0 || hasPreErrors;
|
|
14123
14875
|
const hasOverridable = Object.keys(overridableErrors).length > 0;
|
|
14124
14876
|
const status = hasBlocking
|
|
@@ -14127,17 +14879,18 @@ class TFormImportController {
|
|
|
14127
14879
|
? 'overridable'
|
|
14128
14880
|
: 'valid';
|
|
14129
14881
|
const isValid = !hasBlocking && !hasOverridable;
|
|
14130
|
-
this.
|
|
14882
|
+
this._settleRow(rowIndex, {
|
|
14131
14883
|
status,
|
|
14132
14884
|
settledValue,
|
|
14133
14885
|
isValid,
|
|
14134
14886
|
validationErrors,
|
|
14135
14887
|
overridableErrors,
|
|
14136
14888
|
colErrors,
|
|
14889
|
+
optionChoices: Object.keys(optionOutcome.choices).length > 0 ? optionOutcome.choices : undefined,
|
|
14137
14890
|
});
|
|
14138
14891
|
}
|
|
14139
14892
|
catch (err) {
|
|
14140
|
-
this.
|
|
14893
|
+
this._settleRow(rowIndex, {
|
|
14141
14894
|
status: 'error',
|
|
14142
14895
|
errorMessage: err instanceof Error ? err.message : String(err),
|
|
14143
14896
|
});
|
|
@@ -14146,6 +14899,24 @@ class TFormImportController {
|
|
|
14146
14899
|
tower.ngOnDestroy();
|
|
14147
14900
|
}
|
|
14148
14901
|
}
|
|
14902
|
+
/**
|
|
14903
|
+
* Runs one row of a multiple-input session through
|
|
14904
|
+
* {@link _processMultipleInputItem} and reports its outcome; a tower failure
|
|
14905
|
+
* fails this row alone.
|
|
14906
|
+
*/
|
|
14907
|
+
async _processMultipleInputRow(context, row, rowIndex) {
|
|
14908
|
+
this._patchRow(rowIndex, { status: 'processing' });
|
|
14909
|
+
try {
|
|
14910
|
+
const outcome = await this._processMultipleInputItem(context, row, 0);
|
|
14911
|
+
this._settleRow(rowIndex, this._toMultipleInputRowState(outcome));
|
|
14912
|
+
}
|
|
14913
|
+
catch (err) {
|
|
14914
|
+
this._settleRow(rowIndex, {
|
|
14915
|
+
status: 'error',
|
|
14916
|
+
errorMessage: err instanceof Error ? err.message : String(err),
|
|
14917
|
+
});
|
|
14918
|
+
}
|
|
14919
|
+
}
|
|
14149
14920
|
/**
|
|
14150
14921
|
* Dispatches each column that has a registered pre-processor, collects
|
|
14151
14922
|
* resolved values and errors, then returns the enriched row.
|
|
@@ -14298,19 +15069,7 @@ class TFormImportController {
|
|
|
14298
15069
|
if (rawItems.length === 0) {
|
|
14299
15070
|
return { errors: [] };
|
|
14300
15071
|
}
|
|
14301
|
-
const
|
|
14302
|
-
// One-slide mock form — reused across all items in this field.
|
|
14303
|
-
const mockForm = {
|
|
14304
|
-
slides: [{
|
|
14305
|
-
sectionId: input.sectionId,
|
|
14306
|
-
label: '',
|
|
14307
|
-
columns: subFormInputs.map(col => ({
|
|
14308
|
-
...this._localizeSubInputDeps(col, input.id),
|
|
14309
|
-
multipleInputInEditId: undefined, // Prevent nested MultipleInputs from trying to edit the same item in the same shared mock form
|
|
14310
|
-
})),
|
|
14311
|
-
}],
|
|
14312
|
-
};
|
|
14313
|
-
const hasPreProcessableSubInputs = subFormInputs.some(subInput => this._inputPreProcessors.has(subInput.element));
|
|
15072
|
+
const context = this._multipleInputContext(input);
|
|
14314
15073
|
const processedItems = new Array(rawItems.length);
|
|
14315
15074
|
const errors = [];
|
|
14316
15075
|
const overridableErrors = [];
|
|
@@ -14324,46 +15083,23 @@ class TFormImportController {
|
|
|
14324
15083
|
const item = rawItems[index];
|
|
14325
15084
|
if (!item)
|
|
14326
15085
|
continue;
|
|
14327
|
-
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
|
|
14331
|
-
|
|
14332
|
-
|
|
14333
|
-
|
|
14334
|
-
|
|
14335
|
-
const
|
|
14336
|
-
|
|
14337
|
-
|
|
14338
|
-
|
|
14339
|
-
|
|
14340
|
-
this._recomputeAllValidationErrors(tower.mainForm);
|
|
14341
|
-
processedItems[index] = {
|
|
14342
|
-
...(tower.getFormValueNames() ?? resolvedItem),
|
|
14343
|
-
id: resolvedItem?.['id'] ?? v4()
|
|
14344
|
-
};
|
|
14345
|
-
// Partition this sub-row's settled errors so overridable validations
|
|
14346
|
-
// flag (not invalidate) the parent row. Pre-process errors are always
|
|
14347
|
-
// blocking; nested overridable sub-errors bubble up index-prefixed.
|
|
14348
|
-
const byId = new Map((tower.allFormInputs() ?? []).map(i => [i.id, i]));
|
|
14349
|
-
const { blocking, overridable } = partitionFormErrors(tower);
|
|
14350
|
-
for (const b of blocking) {
|
|
14351
|
-
const fcn = byId.get(b.inputId)?.formControlName ?? b.inputId;
|
|
14352
|
-
errors.push(`[${index}].${fcn}.${b.key}`);
|
|
14353
|
-
}
|
|
14354
|
-
for (const [subFcn, errStr] of Object.entries(preColErrors)) {
|
|
14355
|
-
errors.push(`[${index}].${subFcn}.${errStr}`);
|
|
14356
|
-
}
|
|
14357
|
-
for (const o of overridable) {
|
|
14358
|
-
overridableErrors.push(`[${index}].${o.formControlName}.${o.message}`);
|
|
14359
|
-
}
|
|
14360
|
-
for (const [subId, msgs] of Object.entries(preOverridable)) {
|
|
14361
|
-
for (const msg of msgs)
|
|
14362
|
-
overridableErrors.push(`[${index}].${subId}.${msg}`);
|
|
14363
|
-
}
|
|
15086
|
+
const outcome = await this._processMultipleInputItem(context, item, _depth);
|
|
15087
|
+
processedItems[index] = outcome.value;
|
|
15088
|
+
// Blocking errors first (tower, then pre-processing), then overridable —
|
|
15089
|
+
// the order the inline loop produced before the item pipeline was shared
|
|
15090
|
+
// with `runMultipleInputImport`.
|
|
15091
|
+
for (const b of outcome.blocking) {
|
|
15092
|
+
errors.push(`[${index}].${b.formControlName}.${b.key}`);
|
|
15093
|
+
}
|
|
15094
|
+
for (const [subFcn, errStr] of Object.entries(outcome.preColErrors)) {
|
|
15095
|
+
errors.push(`[${index}].${subFcn}.${errStr}`);
|
|
15096
|
+
}
|
|
15097
|
+
for (const o of outcome.overridable) {
|
|
15098
|
+
overridableErrors.push(`[${index}].${o.formControlName}.${o.message}`);
|
|
14364
15099
|
}
|
|
14365
|
-
|
|
14366
|
-
|
|
15100
|
+
for (const [subId, msgs] of Object.entries(outcome.preOverridable)) {
|
|
15101
|
+
for (const msg of msgs)
|
|
15102
|
+
overridableErrors.push(`[${index}].${subId}.${msg}`);
|
|
14367
15103
|
}
|
|
14368
15104
|
}
|
|
14369
15105
|
return {
|
|
@@ -14372,6 +15108,126 @@ class TFormImportController {
|
|
|
14372
15108
|
overridableErrors,
|
|
14373
15109
|
};
|
|
14374
15110
|
}
|
|
15111
|
+
/**
|
|
15112
|
+
* Builds the per-field context the sub-row pipeline runs against: the
|
|
15113
|
+
* one-slide mock form (children hoisted to top-level columns with their
|
|
15114
|
+
* dependency references localised) and whether any child needs
|
|
15115
|
+
* pre-processing. Built once per field and reused for every row.
|
|
15116
|
+
*/
|
|
15117
|
+
_multipleInputContext(input) {
|
|
15118
|
+
const subFormInputs = input.formInputs ?? [];
|
|
15119
|
+
// One-slide mock form — reused across all items in this field.
|
|
15120
|
+
const mockForm = {
|
|
15121
|
+
slides: [{
|
|
15122
|
+
sectionId: input.sectionId,
|
|
15123
|
+
label: '',
|
|
15124
|
+
columns: subFormInputs.map(col => ({
|
|
15125
|
+
...this._localizeSubInputDeps(col, input.id),
|
|
15126
|
+
multipleInputInEditId: undefined, // Prevent nested MultipleInputs from trying to edit the same item in the same shared mock form
|
|
15127
|
+
})),
|
|
15128
|
+
}],
|
|
15129
|
+
};
|
|
15130
|
+
const hasPreProcessableSubInputs = subFormInputs.some(subInput => this._inputPreProcessors.has(subInput.element));
|
|
15131
|
+
return { mockForm, hasPreProcessableSubInputs };
|
|
15132
|
+
}
|
|
15133
|
+
/**
|
|
15134
|
+
* Runs ONE multiple-input row through the full tower lifecycle — the same
|
|
15135
|
+
* sequence as {@link _processRow} on the main form — and returns its settled
|
|
15136
|
+
* value and partitioned errors. Shared by the bulk path
|
|
15137
|
+
* ({@link _processMultipleFormInput}, which index-prefixes the errors onto the
|
|
15138
|
+
* parent row) and {@link runMultipleInputImport} (which reports each row on
|
|
15139
|
+
* its own).
|
|
15140
|
+
*
|
|
15141
|
+
* Throws when the tower itself fails; callers decide whether that fails the
|
|
15142
|
+
* parent row (bulk) or just this row (single-field import). The tower is
|
|
15143
|
+
* always destroyed.
|
|
15144
|
+
*
|
|
15145
|
+
* @param depth - Nesting depth of the OWNING field; nested MultipleInputs in
|
|
15146
|
+
* the row are pre-processed at `depth + 1`.
|
|
15147
|
+
*/
|
|
15148
|
+
async _processMultipleInputItem(context, item, depth) {
|
|
15149
|
+
const { mockForm, hasPreProcessableSubInputs } = context;
|
|
15150
|
+
// Step 1: resolve raw codes (MSCOA etc.) before the tower sees the data.
|
|
15151
|
+
// Pass depth + 1 so nested MultipleInputs increment the depth guard correctly.
|
|
15152
|
+
const { row: resolvedItem, colErrors: preColErrors, overridableColErrors: preOverridable } = hasPreProcessableSubInputs
|
|
15153
|
+
? await this._preProcessRow(item, mockForm, depth + 1)
|
|
15154
|
+
: { row: item, colErrors: {}, overridableColErrors: {} };
|
|
15155
|
+
// Step 2: full tower lifecycle — same sequence as _processRow — so that
|
|
15156
|
+
// required-field validators, async validators, and calculations all run
|
|
15157
|
+
// and settle before errors are collected.
|
|
15158
|
+
const tower = this._createTower();
|
|
15159
|
+
try {
|
|
15160
|
+
await tower.initialize(mockForm);
|
|
15161
|
+
tower.initializeFormValues(resolvedItem);
|
|
15162
|
+
await tower.waitUntilSettled();
|
|
15163
|
+
// Labels → stored values for the row's choice cells (see _processRow).
|
|
15164
|
+
const optionOutcome = await this._resolveOptionValues(tower, resolvedItem, Object.keys(preColErrors));
|
|
15165
|
+
this._recomputeAllValidationErrors(tower.mainForm);
|
|
15166
|
+
const value = {
|
|
15167
|
+
...(tower.getFormValueNames() ?? resolvedItem),
|
|
15168
|
+
id: resolvedItem?.['id'] ?? v4(),
|
|
15169
|
+
};
|
|
15170
|
+
// Partition this row's settled errors so overridable validations flag
|
|
15171
|
+
// (not invalidate) it. Pre-process errors are always blocking.
|
|
15172
|
+
const byId = new Map((tower.allFormInputs() ?? []).map(i => [i.id, i]));
|
|
15173
|
+
const { blocking, overridable } = partitionFormErrors(tower);
|
|
15174
|
+
return {
|
|
15175
|
+
value,
|
|
15176
|
+
blocking: blocking.map(b => ({
|
|
15177
|
+
inputId: b.inputId,
|
|
15178
|
+
formControlName: byId.get(b.inputId)?.formControlName ?? b.inputId,
|
|
15179
|
+
key: b.key,
|
|
15180
|
+
})),
|
|
15181
|
+
preColErrors: this._mergeColErrors(preColErrors, optionOutcome.colErrors),
|
|
15182
|
+
overridable,
|
|
15183
|
+
preOverridable,
|
|
15184
|
+
optionChoices: optionOutcome.choices,
|
|
15185
|
+
};
|
|
15186
|
+
}
|
|
15187
|
+
finally {
|
|
15188
|
+
tower.ngOnDestroy();
|
|
15189
|
+
}
|
|
15190
|
+
}
|
|
15191
|
+
/**
|
|
15192
|
+
* Projects a settled row outcome onto the {@link ImportRowState} fields with
|
|
15193
|
+
* the status rules of {@link _processRow}: any blocking or pre-processing
|
|
15194
|
+
* error → `invalid`; otherwise any overridable error → `overridable`;
|
|
15195
|
+
* otherwise `valid`. Error maps carry every failing validator key (blocking
|
|
15196
|
+
* and overridable), as the bulk collectors do.
|
|
15197
|
+
*/
|
|
15198
|
+
_toMultipleInputRowState(outcome) {
|
|
15199
|
+
const validationErrors = {};
|
|
15200
|
+
const towerColErrors = {};
|
|
15201
|
+
for (const b of outcome.blocking) {
|
|
15202
|
+
(validationErrors[b.inputId] ??= []).push(b.key);
|
|
15203
|
+
(towerColErrors[b.formControlName] ??= []).push(b.key);
|
|
15204
|
+
}
|
|
15205
|
+
for (const o of outcome.overridable) {
|
|
15206
|
+
(validationErrors[o.inputId] ??= []).push(o.validatorId);
|
|
15207
|
+
(towerColErrors[o.formControlName] ??= []).push(o.validatorId);
|
|
15208
|
+
}
|
|
15209
|
+
const colErrors = {};
|
|
15210
|
+
for (const [fcn, keys] of Object.entries(towerColErrors)) {
|
|
15211
|
+
colErrors[fcn] = keys.join('.');
|
|
15212
|
+
}
|
|
15213
|
+
Object.assign(colErrors, outcome.preColErrors);
|
|
15214
|
+
const overridableErrors = this._groupOverridableByInput(outcome.overridable);
|
|
15215
|
+
for (const [inputId, msgs] of Object.entries(outcome.preOverridable)) {
|
|
15216
|
+
(overridableErrors[inputId] ??= []).push(...msgs);
|
|
15217
|
+
}
|
|
15218
|
+
const hasBlocking = outcome.blocking.length > 0 || Object.keys(outcome.preColErrors).length > 0;
|
|
15219
|
+
const hasOverridable = Object.keys(overridableErrors).length > 0;
|
|
15220
|
+
const status = hasBlocking ? 'invalid' : hasOverridable ? 'overridable' : 'valid';
|
|
15221
|
+
return {
|
|
15222
|
+
status,
|
|
15223
|
+
settledValue: outcome.value,
|
|
15224
|
+
isValid: !hasBlocking && !hasOverridable,
|
|
15225
|
+
validationErrors,
|
|
15226
|
+
overridableErrors,
|
|
15227
|
+
colErrors,
|
|
15228
|
+
optionChoices: Object.keys(outcome.optionChoices).length > 0 ? outcome.optionChoices : undefined,
|
|
15229
|
+
};
|
|
15230
|
+
}
|
|
14375
15231
|
/**
|
|
14376
15232
|
* Rewrites a MultipleInput sub-input's cross-field dependency references from
|
|
14377
15233
|
* the live form's COMPOUND id scheme back to the SIMPLE id the per-row mock
|
|
@@ -14448,7 +15304,9 @@ class TFormImportController {
|
|
|
14448
15304
|
/**
|
|
14449
15305
|
* Pre-processor for `Select` and `PaginatedSelectionTable` inputs.
|
|
14450
15306
|
*
|
|
14451
|
-
* Single-select inputs pass through unchanged
|
|
15307
|
+
* Single-select inputs pass through unchanged — their cell is matched against
|
|
15308
|
+
* the loaded options once the row's tower has settled
|
|
15309
|
+
* ({@link _resolveOptionValues}).
|
|
14452
15310
|
*
|
|
14453
15311
|
* Multi-select inputs accept the value in any of:
|
|
14454
15312
|
* - `string[]` — taken as-is, each entry trimmed.
|
|
@@ -14457,61 +15315,140 @@ class TFormImportController {
|
|
|
14457
15315
|
* - `'[a, b]'` (malformed JSON) — fallback: strip brackets, split, strip quotes.
|
|
14458
15316
|
*
|
|
14459
15317
|
* If the input declares custom (in-config) options, every parsed value is
|
|
14460
|
-
*
|
|
14461
|
-
* the
|
|
14462
|
-
*
|
|
14463
|
-
*
|
|
14464
|
-
*
|
|
14465
|
-
*
|
|
15318
|
+
* matched against them the way the settled pass does: a stored value stands
|
|
15319
|
+
* (in the option's own type and case), a text naming exactly one option by
|
|
15320
|
+
* label becomes that option's value, and a tie is left in place for the
|
|
15321
|
+
* settled pass to report as a choice. Texts that name nothing are returned as
|
|
15322
|
+
* errors of the form `'invalidOption:<value>'` and `value` is omitted (so the
|
|
15323
|
+
* parent form control keeps its original/empty state and the row is flagged
|
|
15324
|
+
* invalid). API-fetched options are not known here; the settled pass matches
|
|
15325
|
+
* those.
|
|
14466
15326
|
*/
|
|
14467
15327
|
async _processSelectInput(input, row) {
|
|
14468
15328
|
const fcn = input.formControlName;
|
|
14469
15329
|
const rawValue = row[fcn];
|
|
14470
|
-
|
|
14471
|
-
if (!isMulti) {
|
|
15330
|
+
if (!isMultiSelectInput(input)) {
|
|
14472
15331
|
return { errors: [], value: rawValue };
|
|
14473
15332
|
}
|
|
14474
15333
|
// Multi-select: normalize raw value to string[]
|
|
14475
15334
|
// Accepted forms: string[] | JSON-stringified array | comma-separated string
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
const
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
? parsed.map(v => String(v).trim())
|
|
14487
|
-
: [String(parsed).trim()];
|
|
15335
|
+
const parsedValues = parseMultiSelectValues(rawValue);
|
|
15336
|
+
const isCustomOptions = input.matOptions?.fetch?.options?.source === 'customOptions';
|
|
15337
|
+
if (isCustomOptions && input.matOptions?.options) {
|
|
15338
|
+
const candidates = optionCandidates(input);
|
|
15339
|
+
const resolved = [];
|
|
15340
|
+
const invalidValues = [];
|
|
15341
|
+
for (const text of parsedValues) {
|
|
15342
|
+
const match = matchOptionText(text, candidates);
|
|
15343
|
+
if (match.kind === 'value' || match.kind === 'label') {
|
|
15344
|
+
resolved.push(match.value);
|
|
14488
15345
|
}
|
|
14489
|
-
|
|
14490
|
-
|
|
14491
|
-
|
|
14492
|
-
|
|
14493
|
-
|
|
14494
|
-
.map(v => v.trim().replace(/^["']|["']$/g, ''))
|
|
14495
|
-
.filter(Boolean);
|
|
15346
|
+
else if (match.kind === 'unmatched') {
|
|
15347
|
+
invalidValues.push(text);
|
|
15348
|
+
}
|
|
15349
|
+
else {
|
|
15350
|
+
resolved.push(text);
|
|
14496
15351
|
}
|
|
14497
15352
|
}
|
|
14498
|
-
else {
|
|
14499
|
-
parsedValues = trimmed.split(',').map(v => v.trim()).filter(Boolean);
|
|
14500
|
-
}
|
|
14501
|
-
}
|
|
14502
|
-
else {
|
|
14503
|
-
parsedValues = [];
|
|
14504
|
-
}
|
|
14505
|
-
const isCustomOptions = input.matOptions?.fetch?.options?.source === 'customOptions';
|
|
14506
|
-
if (isCustomOptions && input.matOptions?.options) {
|
|
14507
|
-
const validOptionValues = new Set(input.matOptions.options.map((opt) => String(opt.value)));
|
|
14508
|
-
const invalidValues = parsedValues.filter(v => !validOptionValues.has(v));
|
|
14509
15353
|
if (invalidValues.length > 0) {
|
|
14510
15354
|
return { errors: invalidValues.map(v => `invalidOption:${v}`) };
|
|
14511
15355
|
}
|
|
15356
|
+
return { value: resolved, errors: [] };
|
|
14512
15357
|
}
|
|
14513
15358
|
return { value: parsedValues, errors: [] };
|
|
14514
15359
|
}
|
|
15360
|
+
/**
|
|
15361
|
+
* Swaps what the user typed into a row's choice cells for what the form
|
|
15362
|
+
* stores.
|
|
15363
|
+
*
|
|
15364
|
+
* Runs after the row's first settle, when the tower has loaded every option
|
|
15365
|
+
* list the row's values reach. Each choice input (select, autocomplete,
|
|
15366
|
+
* paginated selection table) whose cell the tower holds as written — a
|
|
15367
|
+
* tower-owned value, from an API or a calculation, is left alone — is
|
|
15368
|
+
* matched against its options through {@link resolveOptionCell}: a stored
|
|
15369
|
+
* value stands, a unique label (or table column value) becomes the stored
|
|
15370
|
+
* value, a tie is kept for the user, an unmatched text on a strict field is
|
|
15371
|
+
* an error. Nothing is judged while an option list is still empty. A swap
|
|
15372
|
+
* can change what a dependent option list fetches, so after any swap the
|
|
15373
|
+
* tower settles again and the pass repeats, until a pass changes nothing or
|
|
15374
|
+
* {@link MAX_OPTION_PASSES} is reached.
|
|
15375
|
+
*
|
|
15376
|
+
* @param tower - The row's settled tower.
|
|
15377
|
+
* @param row - The pre-processed row the tower was initialised from.
|
|
15378
|
+
* @param rejected - `formControlName`s a pre-processor already reported an
|
|
15379
|
+
* error for; their cells are not judged again (the pre-processor's verdict
|
|
15380
|
+
* stands, and the cell it refused still reaches the tower as raw text).
|
|
15381
|
+
* @returns Blocking column errors (`ambiguousOption:<text>`,
|
|
15382
|
+
* `invalidOption:<text>`; several joined with `.`) and the choices left
|
|
15383
|
+
* for the user, both keyed by `formControlName`.
|
|
15384
|
+
*/
|
|
15385
|
+
async _resolveOptionValues(tower, row, rejected) {
|
|
15386
|
+
const skip = new Set(rejected);
|
|
15387
|
+
/** inputId → the cell as this method last wrote it. */
|
|
15388
|
+
const written = new Map();
|
|
15389
|
+
let colErrors = {};
|
|
15390
|
+
let choices = {};
|
|
15391
|
+
for (let pass = 0; pass < MAX_OPTION_PASSES; pass++) {
|
|
15392
|
+
colErrors = {};
|
|
15393
|
+
choices = {};
|
|
15394
|
+
let changed = false;
|
|
15395
|
+
const live = tower.getFormValue();
|
|
15396
|
+
for (const input of tower.allFormInputs()) {
|
|
15397
|
+
const kind = optionInputKind(input);
|
|
15398
|
+
const fcn = input.formControlName;
|
|
15399
|
+
if (!kind || !fcn || skip.has(fcn))
|
|
15400
|
+
continue;
|
|
15401
|
+
const cell = written.has(input.id) ? written.get(input.id) : row[fcn];
|
|
15402
|
+
if (isBlankOptionCell(cell) || !this._holdsCell(live[input.id], cell))
|
|
15403
|
+
continue;
|
|
15404
|
+
const candidates = optionCandidates(input);
|
|
15405
|
+
if (candidates.length === 0)
|
|
15406
|
+
continue;
|
|
15407
|
+
const result = resolveOptionCell(cell, candidates, { multi: isMultiSelectInput(input), kind });
|
|
15408
|
+
if (result.changed) {
|
|
15409
|
+
tower.updateValue(input.id, result.value);
|
|
15410
|
+
written.set(input.id, result.value);
|
|
15411
|
+
changed = true;
|
|
15412
|
+
}
|
|
15413
|
+
if (result.choices.length > 0) {
|
|
15414
|
+
choices[fcn] = [...result.choices];
|
|
15415
|
+
}
|
|
15416
|
+
const errors = [
|
|
15417
|
+
...result.choices.map(choice => `ambiguousOption:${choice.text}`),
|
|
15418
|
+
...result.unmatched.map(text => `invalidOption:${text}`),
|
|
15419
|
+
];
|
|
15420
|
+
if (errors.length > 0) {
|
|
15421
|
+
colErrors[fcn] = errors.join('.');
|
|
15422
|
+
}
|
|
15423
|
+
}
|
|
15424
|
+
if (!changed)
|
|
15425
|
+
break;
|
|
15426
|
+
await tower.waitUntilSettled();
|
|
15427
|
+
}
|
|
15428
|
+
return { colErrors, choices };
|
|
15429
|
+
}
|
|
15430
|
+
/**
|
|
15431
|
+
* Whether the tower holds `cell` for an input — i.e. the imported cell was
|
|
15432
|
+
* applied rather than displaced by a tower-owned value. Compared as text so
|
|
15433
|
+
* a numeric id written from a text cell still counts.
|
|
15434
|
+
*/
|
|
15435
|
+
_holdsCell(live, cell) {
|
|
15436
|
+
if (Array.isArray(live) && Array.isArray(cell)) {
|
|
15437
|
+
return live.length === cell.length && live.every((v, i) => String(v) === String(cell[i]));
|
|
15438
|
+
}
|
|
15439
|
+
if (Array.isArray(live) || Array.isArray(cell))
|
|
15440
|
+
return false;
|
|
15441
|
+
return String(live) === String(cell);
|
|
15442
|
+
}
|
|
15443
|
+
/** Merges two `formControlName → 'a.b'` error maps, joining keys that occur in both. */
|
|
15444
|
+
_mergeColErrors(first, second) {
|
|
15445
|
+
const merged = { ...first };
|
|
15446
|
+
for (const [fcn, errors] of Object.entries(second)) {
|
|
15447
|
+
const existing = merged[fcn];
|
|
15448
|
+
merged[fcn] = existing ? `${existing}.${errors}` : errors;
|
|
15449
|
+
}
|
|
15450
|
+
return merged;
|
|
15451
|
+
}
|
|
14515
15452
|
/**
|
|
14516
15453
|
* Re-runs sync validation across the WHOLE form tree against the settled values.
|
|
14517
15454
|
*
|
|
@@ -14679,6 +15616,160 @@ class TFormImportController {
|
|
|
14679
15616
|
// Scalars / mismatched shapes: tower value is favored.
|
|
14680
15617
|
return override;
|
|
14681
15618
|
}
|
|
15619
|
+
// -------------------------------------------------------------------------
|
|
15620
|
+
// Queue and duplicate rows
|
|
15621
|
+
// -------------------------------------------------------------------------
|
|
15622
|
+
/**
|
|
15623
|
+
* Processes every queued row — `pending`, and so not held as a duplicate —
|
|
15624
|
+
* lowest index first, until none is left. A row's outcome can release rows
|
|
15625
|
+
* queued behind it (see {@link _reconcile}); they are picked up in turn.
|
|
15626
|
+
*
|
|
15627
|
+
* Rows are processed SEQUENTIALLY, not concurrently. Each row spins up its
|
|
15628
|
+
* own tower whose settle (`waitUntilSettled`) and FormGroup projection rely
|
|
15629
|
+
* on `ApplicationRef.tick()`-driven effect flushes over the application's
|
|
15630
|
+
* single shared `ApplicationRef`. Running every row concurrently makes those
|
|
15631
|
+
* ticks interleave across towers, so `waitUntilSettled` resolves on a
|
|
15632
|
+
* spurious `settled === true` (value resources still `idle`, not yet
|
|
15633
|
+
* `loading`) before a row's derived values have drained and projected —
|
|
15634
|
+
* leaving most rows with empty API-derived fields (objectives/nKPA/etc.).
|
|
15635
|
+
* The per-session HTTP caches (`_getCache`/`_postCache`/`_financialCycles$`)
|
|
15636
|
+
* still dedupe identical requests across rows, so sequential processing
|
|
15637
|
+
* reuses the same network calls without the race.
|
|
15638
|
+
*
|
|
15639
|
+
* @param process - Settles the row at an index from its raw data; must leave
|
|
15640
|
+
* it in a terminal status.
|
|
15641
|
+
*/
|
|
15642
|
+
async _runQueued(process) {
|
|
15643
|
+
const started = new Set();
|
|
15644
|
+
for (;;) {
|
|
15645
|
+
const rowIndex = this._nextQueued();
|
|
15646
|
+
if (rowIndex < 0)
|
|
15647
|
+
return;
|
|
15648
|
+
const state = this._rows$.value[rowIndex];
|
|
15649
|
+
if (!state || started.has(rowIndex)) {
|
|
15650
|
+
throw new Error(`Import row ${rowIndex} was queued again without settling.`);
|
|
15651
|
+
}
|
|
15652
|
+
started.add(rowIndex);
|
|
15653
|
+
await process(rowIndex, state.originalData);
|
|
15654
|
+
}
|
|
15655
|
+
}
|
|
15656
|
+
/** The lowest index of a row that is `pending` and has data to process, or -1. */
|
|
15657
|
+
_nextQueued() {
|
|
15658
|
+
const rows = this._rows$.value;
|
|
15659
|
+
for (let i = 0; i < rows.length; i++) {
|
|
15660
|
+
const state = rows[i];
|
|
15661
|
+
if (state?.status === 'pending' && state.originalData)
|
|
15662
|
+
return i;
|
|
15663
|
+
}
|
|
15664
|
+
return -1;
|
|
15665
|
+
}
|
|
15666
|
+
/**
|
|
15667
|
+
* The duplicate detection a session runs with, or `null` when `identity`
|
|
15668
|
+
* names no keys. Throws when a key is not one of `fields`: a key that
|
|
15669
|
+
* matched nothing would leave every row blank there and make each a
|
|
15670
|
+
* duplicate of the first, so the failure has to be loud.
|
|
15671
|
+
*/
|
|
15672
|
+
_identitySession(identity, fields) {
|
|
15673
|
+
const keys = [...new Set(identity?.distinctKeys ?? [])];
|
|
15674
|
+
if (keys.length === 0)
|
|
15675
|
+
return null;
|
|
15676
|
+
const unknown = keys.filter(key => !fields.has(key));
|
|
15677
|
+
if (unknown.length > 0) {
|
|
15678
|
+
const named = unknown.map(key => `"${key}"`).join(', ');
|
|
15679
|
+
throw new Error(`Duplicate detection: ${named} ${unknown.length === 1 ? 'is not a field' : 'are not fields'} of the form.`);
|
|
15680
|
+
}
|
|
15681
|
+
return { keys, policy: identity?.onDuplicate ?? 'skip' };
|
|
15682
|
+
}
|
|
15683
|
+
/** The `formControlName`s of a form's top-level columns. */
|
|
15684
|
+
_formControlNames(form) {
|
|
15685
|
+
return new Set(form.slides
|
|
15686
|
+
.flatMap(slide => slide.columns.map(col => col.formControlName))
|
|
15687
|
+
.filter((name) => typeof name === 'string' && name.length > 0));
|
|
15688
|
+
}
|
|
15689
|
+
/** The `formControlName`s of a MultipleInput's children. */
|
|
15690
|
+
_childControlNames(input) {
|
|
15691
|
+
return new Set((input.formInputs ?? [])
|
|
15692
|
+
.map(child => child?.formControlName)
|
|
15693
|
+
.filter((name) => typeof name === 'string' && name.length > 0));
|
|
15694
|
+
}
|
|
15695
|
+
/**
|
|
15696
|
+
* Records a row's own outcome and reports it — as a duplicate, if the
|
|
15697
|
+
* session says so — in one emission, so no subscriber sees a verdict that
|
|
15698
|
+
* is about to be overlaid.
|
|
15699
|
+
*/
|
|
15700
|
+
_settleRow(rowIndex, outcome) {
|
|
15701
|
+
if (outcome.status) {
|
|
15702
|
+
this._verdicts.set(rowIndex, { status: outcome.status, isValid: outcome.isValid });
|
|
15703
|
+
}
|
|
15704
|
+
const rows = [...this._rows$.value];
|
|
15705
|
+
rows[rowIndex] = { ...rows[rowIndex], ...outcome };
|
|
15706
|
+
this._rows$.next(this._reconcile(rows));
|
|
15707
|
+
}
|
|
15708
|
+
/**
|
|
15709
|
+
* Queues a row again with `row` as its data, its earlier outcome cleared,
|
|
15710
|
+
* and re-evaluates which rows repeat which: the row may now repeat an
|
|
15711
|
+
* earlier one, and rows that repeated it may be released.
|
|
15712
|
+
*/
|
|
15713
|
+
_requeueRow(rowIndex, row) {
|
|
15714
|
+
this._verdicts.delete(rowIndex);
|
|
15715
|
+
const rows = [...this._rows$.value];
|
|
15716
|
+
rows[rowIndex] = { ...rows[rowIndex], ...this._freshRowPatch(row) };
|
|
15717
|
+
this._rows$.next(this._reconcile(rows));
|
|
15718
|
+
}
|
|
15719
|
+
/** Reports the current rows through {@link _reconcile}, emitting only when something changed. */
|
|
15720
|
+
_reconcileDuplicates() {
|
|
15721
|
+
const rows = this._rows$.value;
|
|
15722
|
+
const next = this._reconcile(rows);
|
|
15723
|
+
if (next !== rows)
|
|
15724
|
+
this._rows$.next(next);
|
|
15725
|
+
}
|
|
15726
|
+
/**
|
|
15727
|
+
* Applies the session's duplicate relation to `rows` and returns them as
|
|
15728
|
+
* they are to be reported — `rows` itself when nothing changes.
|
|
15729
|
+
*
|
|
15730
|
+
* Each row's identities — raw, from `originalData`; settled, from
|
|
15731
|
+
* `settledValue` once it has one — go through {@link assignDuplicates},
|
|
15732
|
+
* first wins. A row that repeats an earlier one is reported as its
|
|
15733
|
+
* duplicate: under `skip` with status `duplicate` and `isValid: false`,
|
|
15734
|
+
* whatever it settled to kept; under `flag` with `duplicateOf` alone. A row
|
|
15735
|
+
* that no longer repeats anything gets its own verdict back — or, never
|
|
15736
|
+
* having been processed, returns to the queue as `pending`.
|
|
15737
|
+
*/
|
|
15738
|
+
_reconcile(rows) {
|
|
15739
|
+
const identity = this._identity;
|
|
15740
|
+
if (!identity)
|
|
15741
|
+
return rows;
|
|
15742
|
+
const originals = assignDuplicates(rows.map(state => ({
|
|
15743
|
+
raw: rowIdentityKey(state.originalData, identity.keys),
|
|
15744
|
+
// Once settled, a row blank in every key field has an identity still: blank.
|
|
15745
|
+
settled: state.settledValue ? (rowIdentityKey(state.settledValue, identity.keys) ?? BLANK_IDENTITY) : undefined,
|
|
15746
|
+
})));
|
|
15747
|
+
let changed = false;
|
|
15748
|
+
const next = rows.map((state, rowIndex) => {
|
|
15749
|
+
const reported = this._reportRow(state, rowIndex, originals[rowIndex], identity.policy);
|
|
15750
|
+
if (reported !== state)
|
|
15751
|
+
changed = true;
|
|
15752
|
+
return reported;
|
|
15753
|
+
});
|
|
15754
|
+
return changed ? next : rows;
|
|
15755
|
+
}
|
|
15756
|
+
/** One row as it is to be reported, given the row it repeats (`original`), if any. */
|
|
15757
|
+
_reportRow(state, rowIndex, original, policy) {
|
|
15758
|
+
if (original === undefined) {
|
|
15759
|
+
if (state.duplicateOf === undefined)
|
|
15760
|
+
return state;
|
|
15761
|
+
const verdict = this._verdicts.get(rowIndex);
|
|
15762
|
+
return verdict
|
|
15763
|
+
? { ...state, status: verdict.status, isValid: verdict.isValid, duplicateOf: undefined }
|
|
15764
|
+
: { ...state, status: 'pending', isValid: undefined, duplicateOf: undefined };
|
|
15765
|
+
}
|
|
15766
|
+
if (policy === 'flag') {
|
|
15767
|
+
return state.duplicateOf === original ? state : { ...state, duplicateOf: original };
|
|
15768
|
+
}
|
|
15769
|
+
return state.status === 'duplicate' && state.duplicateOf === original
|
|
15770
|
+
? state
|
|
15771
|
+
: { ...state, status: 'duplicate', isValid: false, duplicateOf: original };
|
|
15772
|
+
}
|
|
14682
15773
|
/**
|
|
14683
15774
|
* Immutable row update — clones the rows array and the targeted row before
|
|
14684
15775
|
* pushing through `_rows$` so subscribers downstream of `progress$` always
|
|
@@ -14699,11 +15790,12 @@ class TFormImportController {
|
|
|
14699
15790
|
total: rows.length,
|
|
14700
15791
|
pending: count('pending'),
|
|
14701
15792
|
processing: count('processing'),
|
|
14702
|
-
complete: count('valid') + count('overridable') + count('invalid'),
|
|
15793
|
+
complete: count('valid') + count('overridable') + count('invalid') + count('duplicate'),
|
|
14703
15794
|
valid: count('valid'),
|
|
14704
15795
|
overridable: count('overridable'),
|
|
14705
15796
|
invalid: count('invalid'),
|
|
14706
15797
|
error: count('error'),
|
|
15798
|
+
duplicate: rows.filter(r => r.duplicateOf !== undefined).length,
|
|
14707
15799
|
rows,
|
|
14708
15800
|
};
|
|
14709
15801
|
}
|
|
@@ -26126,6 +27218,76 @@ function withAiMscoaGrounding(grounding) {
|
|
|
26126
27218
|
};
|
|
26127
27219
|
}
|
|
26128
27220
|
|
|
27221
|
+
/**
|
|
27222
|
+
* Lets users prepopulate a multiple-input table from a spreadsheet.
|
|
27223
|
+
*
|
|
27224
|
+
* Binds the supplied parser to {@link SPREADSHEET_PARSER}. With it bound, every
|
|
27225
|
+
* multiple-input field that allows adding rows gains a chevron on its add-row
|
|
27226
|
+
* button whose menu offers "Import from spreadsheet". The user picks a file;
|
|
27227
|
+
* each row is validated by the same per-row tower the bulk
|
|
27228
|
+
* `TFormImportController` uses for that field's sub-rows — calculations,
|
|
27229
|
+
* API-fetched options, mSCOA lookups and custom validators included — and the
|
|
27230
|
+
* rows that pass are appended to the table. Rows that fail are shown against
|
|
27231
|
+
* their column headers and are never added.
|
|
27232
|
+
*
|
|
27233
|
+
* Pass a `writer` as well and the menu also offers "Download import template":
|
|
27234
|
+
* a workbook the library builds for the field — a data sheet carrying exactly
|
|
27235
|
+
* the headers the import matches, plus a `Guide` sheet that says what goes in
|
|
27236
|
+
* each column — which the writer serialises ({@link SPREADSHEET_WRITER}). The
|
|
27237
|
+
* import dialog then offers the same download in place of its column list.
|
|
27238
|
+
*
|
|
27239
|
+
* The library does not read or write workbooks itself: both functions are the
|
|
27240
|
+
* host's, so the app decides which spreadsheet library it carries and how cells
|
|
27241
|
+
* are normalised (dates, formula results, rich text). Omit the feature and
|
|
27242
|
+
* nothing changes — the affordances stay hidden and no import code path is
|
|
27243
|
+
* reachable.
|
|
27244
|
+
*
|
|
27245
|
+
* Expected sheet layout: row 1 is the header row; a header matches a child
|
|
27246
|
+
* input by its `formControlName` or, failing that, its label (both
|
|
27247
|
+
* case-insensitively). A workbook with several sheets uses the one named after
|
|
27248
|
+
* the field's `formControlName` when present, otherwise the first — so the
|
|
27249
|
+
* detail sheet of a bulk-import template, or the template downloaded from the
|
|
27250
|
+
* menu, can be reused as-is. An `id` column is ignored: imported rows always
|
|
27251
|
+
* receive fresh identities.
|
|
27252
|
+
*
|
|
27253
|
+
* @param parser Reads a picked file's bytes into header-keyed rows per sheet.
|
|
27254
|
+
* @param options.writer Serialises the import template the library builds for
|
|
27255
|
+
* a field. Optional; without it no template is offered.
|
|
27256
|
+
*
|
|
27257
|
+
* @example
|
|
27258
|
+
* provideNgxTForms(
|
|
27259
|
+
* config,
|
|
27260
|
+
* withSpreadsheetImport(
|
|
27261
|
+
* async ({ data }) => {
|
|
27262
|
+
* const workbook = new ExcelJS.Workbook();
|
|
27263
|
+
* await workbook.xlsx.load(data);
|
|
27264
|
+
* return workbook.worksheets.map(sheet => ({ name: sheet.name, rows: sheetToRows(sheet) }));
|
|
27265
|
+
* },
|
|
27266
|
+
* {
|
|
27267
|
+
* writer: async ({ baseName, sheets }) => ({
|
|
27268
|
+
* fileName: `${baseName}.xlsx`,
|
|
27269
|
+
* mimeType: XLSX_MIME,
|
|
27270
|
+
* data: await writeWorkbook(sheets),
|
|
27271
|
+
* }),
|
|
27272
|
+
* },
|
|
27273
|
+
* ),
|
|
27274
|
+
* )
|
|
27275
|
+
*/
|
|
27276
|
+
function withSpreadsheetImport(parser, options = {}) {
|
|
27277
|
+
if (typeof parser !== 'function') {
|
|
27278
|
+
throw new Error('withSpreadsheetImport(): a parser function is required.');
|
|
27279
|
+
}
|
|
27280
|
+
const { writer } = options;
|
|
27281
|
+
if (writer !== undefined && typeof writer !== 'function') {
|
|
27282
|
+
throw new Error('withSpreadsheetImport(): `writer` must be a function when given.');
|
|
27283
|
+
}
|
|
27284
|
+
const providers = [{ provide: SPREADSHEET_PARSER, useValue: parser }];
|
|
27285
|
+
if (writer) {
|
|
27286
|
+
providers.push({ provide: SPREADSHEET_WRITER, useValue: writer });
|
|
27287
|
+
}
|
|
27288
|
+
return { kind: 10 /* NgxTFormsFeatureKind.SpreadsheetImport */, providers };
|
|
27289
|
+
}
|
|
27290
|
+
|
|
26129
27291
|
/**
|
|
26130
27292
|
* @public
|
|
26131
27293
|
*
|
|
@@ -26748,9 +27910,9 @@ class FormBuilderComponent {
|
|
|
26748
27910
|
this.#store.actionsFormBuilder.setFormTitle(value);
|
|
26749
27911
|
}
|
|
26750
27912
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FormBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
26751
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FormBuilderComponent, isStandalone: true, selector: "lib-form-builder, app-form-builder", inputs: { formId: { classPropertyName: "formId", publicName: "formId", isSignal: true, isRequired: false, transformFunction: null } }, providers: [FormsStoreService], ngImport: i0, template: "<header style=\"position:fixed;width:100%;left:0px;top:0px\">\r\n <mat-toolbar color=\"primary\">\r\n @if (closeButton) {\r\n <button mat-icon-button [style.color]=\"closeButton.color\" (click)=\"closeButton.onClick()\">\r\n <mat-icon>{{closeButton.icon}}</mat-icon>\r\n </button>\r\n }\r\n\r\n <!-- Navigation group -->\r\n <div class=\"nav-group\">\r\n <button mat-button routerLink=\"/\">Forms</button>\r\n <mat-icon>navigate_next</mat-icon>\r\n </div>\r\n\r\n <!-- Title input with optimized binding -->\r\n @if (selectHasFormId()) {\r\n <input [ngModel]=\"titleValue()\" (ngModelChange)=\"setTitleValue($event)\" class=\"section-title-input\" placeholder=\"Enter Form Title\">\r\n }\r\n\r\n <span class=\"spacer\"></span>\r\n\r\n @defer (on viewport) {\r\n <lib-forms-builder-menu />\r\n } @placeholder {\r\n <div style=\"padding: 50px;display:flex;justify-content:center;align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"20\" />\r\n </div>\r\n\r\n }\r\n\r\n <span class=\"divider\">|</span>\r\n\r\n <!-- Persist to server: visible once local preview is in sync -->\r\n @if (!pendingExternalRefresh()) {\r\n <button mat-raised-button color=\"accent\" class=\"save-button\" [disabled]=\"!(canSaveForm())\" (click)=\"saveForm()\">\r\n <mat-icon style=\"width: 24px;\">cloud_upload</mat-icon>\r\n @if (selectFormBuilderIsBusy()) {\r\n <span class=\"save-text\">\r\n <span class=\"save-label\">{{(isNewForm()) ? 'Creating form...' : 'Saving changes...'}}</span>\r\n </span>\r\n } @else {\r\n <span class=\"save-text\">\r\n <span class=\"save-label\">{{(isNewForm()) ? 'Save New Form' : 'Save Changes'}}</span>\r\n @if (canSaveForm()) {\r\n <span class=\"save-sub\">Not saved to server yet</span>\r\n }\r\n </span>\r\n }\r\n </button>\r\n }\r\n\r\n <!-- Local sync: applies your changes to the builder preview \u00B7 does NOT save to server -->\r\n @if (pendingExternalRefresh()) {\r\n <button class=\"refresh-button\" matRipple matRippleColor=\"rgba(255,255,255,0.12)\" (click)=\"triggerRefreshNow()\">\r\n <span class=\"countdown-ring\">\r\n <mat-progress-spinner\r\n diameter=\"34\"\r\n mode=\"determinate\"\r\n [value]=\"refreshCountdown() * 20\">\r\n </mat-progress-spinner>\r\n <span class=\"countdown-number\">{{refreshCountdown()}}</span>\r\n </span>\r\n <span class=\"refresh-text\">\r\n <span class=\"refresh-label\">Apply Now</span>\r\n <span class=\"refresh-sub\">Preview updates in {{refreshCountdown()}}s</span>\r\n </span>\r\n <mat-icon class=\"refresh-chevron\">chevron_right</mat-icon>\r\n </button>\r\n }\r\n\r\n </mat-toolbar>\r\n</header>\r\n\r\n<!-- Main content with optimized loading -->\r\n@defer (on viewport) {\r\n<div class=\"container\">\r\n <div class=\"middle\">\r\n <br>\r\n @if (selectLoadingForm()) {\r\n <div class=\"loading-container\">\r\n <mat-spinner />\r\n </div>\r\n } @else {\r\n <lib-form-section-stepper />\r\n }\r\n <br>\r\n @if ((hasMissingConfigs()) && !(selectLoadingForm())) {\r\n <lib-missing-form-configs />\r\n }\r\n <!-- Updated time info -->\r\n @if (!(isNewForm())) {\r\n <div class=\"updated-time\">\r\n <mat-icon>update</mat-icon>\r\n <span>Updated {{ selectFormUpdated() }}</span>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (elementEditorOpen()) {\r\n <lib-input-editor style=\"max-width:480px;height:calc(100vh - 76px);\r\n position:sticky;\r\n top:76px;\r\n z-index:1\" cdkDrag cdkDragBoundary=\"container\" class=\"middle editor-container\" />\r\n }\r\n <!-- Missing fields section -->`\r\n\r\n\r\n</div>\r\n}@placeholder {\r\n<div style=\"padding: 50px;display:flex;justify-content:center;align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"50\" />\r\n</div>\r\n}", styles: [".container{display:flex;width:100%;height:calc(100% - 64px);padding-top:4em}.side{width:100px;background-color:var(--sem-error-surface)}.middle{flex-grow:1;height:calc(100vh - 68px);overflow:auto;background-color:none}.section-title-input{border:none;background-color:transparent;font-size:.8575em;font-weight:600;color:var(--lib-forms-on-primary);padding-top:12px;padding-bottom:12px;outline:none;width:100%;min-width:268px;transition:border-bottom-color .3s ease-in-out}.section-title-input:focus{border-bottom:1px solid var(--lib-forms-on-primary)}.missing-fields{position:fixed;bottom:0}.updated-time{display:flex;color:var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));gap:8px;align-items:center;line-height:normal;font-size:.875em;bottom:0;position:absolute;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);padding:8px;border-radius:4px}.nav-group{display:flex;align-items:center;gap:8px}.save-button{margin-left:8px;min-width:168px;height:44px}.save-button .save-text{display:flex;flex-direction:column;align-items:flex-start;gap:2px}.save-button .save-text .save-label{font-size:13px;font-weight:600;line-height:1;letter-spacing:.01em;white-space:nowrap}.save-button .save-text .save-sub{font-size:10px;line-height:1;opacity:.78;white-space:nowrap}.refresh-button{margin-left:8px;background:var(--mat-fab-small-container-color, var(--mat-sys-tertiary-container));color:var(--mat-sys-on-tertiary-container);border:1.5px solid var(--mat-sys-outline-variant);border-radius:10px;padding:4px 14px 4px 6px;cursor:pointer;display:inline-flex;align-items:center;gap:12px;height:44px;width:fit-content;box-shadow:0 2px 12px color-mix(in srgb,var(--lib-forms-shadow-color) 18%,transparent);transition:box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing),transform var(--lib-forms-duration-hover) var(--lib-forms-easing);outline:none;overflow:hidden;position:relative}.refresh-button:hover{box-shadow:0 4px 20px color-mix(in srgb,var(--lib-forms-shadow-color) 28%,transparent);transform:translateY(-1px)}.refresh-button:active{transform:translateY(0);box-shadow:0 1px 6px color-mix(in srgb,var(--lib-forms-shadow-color) 12%,transparent)}.refresh-button .countdown-ring{position:relative;width:34px;height:34px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.refresh-button .countdown-ring mat-progress-spinner{position:absolute;inset:0;--mdc-circular-progress-active-indicator-color: var(--mat-sys-on-tertiary-container);--mdc-circular-progress-track-color: color-mix(in srgb, var(--mat-sys-on-tertiary-container) 18%, transparent)}.refresh-button .countdown-ring .countdown-number{font-size:11px;font-weight:600;line-height:1;z-index:1;letter-spacing:-.3px;color:var(--mat-sys-on-tertiary-container)}.refresh-button .refresh-text{display:flex;flex-direction:column;align-items:flex-start;gap:3px}.refresh-button .refresh-text .refresh-label{font-size:13px;font-weight:600;line-height:1;letter-spacing:.01em;white-space:nowrap;color:var(--mat-sys-on-tertiary-container)}.refresh-button .refresh-text .refresh-sub{font-size:10px;line-height:1;opacity:.68;white-space:nowrap;color:var(--mat-sys-on-tertiary-container)}.refresh-button .refresh-chevron{font-size:18px;width:18px;height:18px;opacity:.65;flex-shrink:0;color:var(--mat-sys-on-tertiary-container)}.loading-container{display:flex;height:calc(100% - 150px);justify-content:center;align-items:center}.editor-container{max-width:500px}.divider{margin:0 8px;opacity:.5}app-missing-form-configs{position:absolute;bottom:0;right:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i7.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i7$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('./ngx-t-forms-forms-builder-menu.component-DH4-vxBX.mjs').then(m => m.FormsBuilderMenuComponent)], () => [i3$1.MatIcon, i4.MatProgressSpinner, i1$2.CdkDrag, import('./ngx-t-forms-input-editor.component-DNg-p_Wl.mjs').then(m => m.InputEditorComponent), import('./ngx-t-forms-form-section-stepper.component-5p9gBgjj.mjs').then(m => m.FormSectionStepperComponent), import('./ngx-t-forms-missing-form-configs.component-P8CDm5nZ.mjs').then(m => m.MissingFormConfigsComponent)]] }); }
|
|
27913
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FormBuilderComponent, isStandalone: true, selector: "lib-form-builder, app-form-builder", inputs: { formId: { classPropertyName: "formId", publicName: "formId", isSignal: true, isRequired: false, transformFunction: null } }, providers: [FormsStoreService], ngImport: i0, template: "<header style=\"position:fixed;width:100%;left:0px;top:0px\">\r\n <mat-toolbar color=\"primary\">\r\n @if (closeButton) {\r\n <button mat-icon-button [style.color]=\"closeButton.color\" (click)=\"closeButton.onClick()\">\r\n <mat-icon>{{closeButton.icon}}</mat-icon>\r\n </button>\r\n }\r\n\r\n <!-- Navigation group -->\r\n <div class=\"nav-group\">\r\n <button mat-button routerLink=\"/\">Forms</button>\r\n <mat-icon>navigate_next</mat-icon>\r\n </div>\r\n\r\n <!-- Title input with optimized binding -->\r\n @if (selectHasFormId()) {\r\n <input [ngModel]=\"titleValue()\" (ngModelChange)=\"setTitleValue($event)\" class=\"section-title-input\" placeholder=\"Enter Form Title\">\r\n }\r\n\r\n <span class=\"spacer\"></span>\r\n\r\n @defer (on viewport) {\r\n <lib-forms-builder-menu />\r\n } @placeholder {\r\n <div style=\"padding: 50px;display:flex;justify-content:center;align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"20\" />\r\n </div>\r\n\r\n }\r\n\r\n <span class=\"divider\">|</span>\r\n\r\n <!-- Persist to server: visible once local preview is in sync -->\r\n @if (!pendingExternalRefresh()) {\r\n <button mat-raised-button color=\"accent\" class=\"save-button\" [disabled]=\"!(canSaveForm())\" (click)=\"saveForm()\">\r\n <mat-icon style=\"width: 24px;\">cloud_upload</mat-icon>\r\n @if (selectFormBuilderIsBusy()) {\r\n <span class=\"save-text\">\r\n <span class=\"save-label\">{{(isNewForm()) ? 'Creating form...' : 'Saving changes...'}}</span>\r\n </span>\r\n } @else {\r\n <span class=\"save-text\">\r\n <span class=\"save-label\">{{(isNewForm()) ? 'Save New Form' : 'Save Changes'}}</span>\r\n @if (canSaveForm()) {\r\n <span class=\"save-sub\">Not saved to server yet</span>\r\n }\r\n </span>\r\n }\r\n </button>\r\n }\r\n\r\n <!-- Local sync: applies your changes to the builder preview \u00B7 does NOT save to server -->\r\n @if (pendingExternalRefresh()) {\r\n <button class=\"refresh-button\" matRipple matRippleColor=\"rgba(255,255,255,0.12)\" (click)=\"triggerRefreshNow()\">\r\n <span class=\"countdown-ring\">\r\n <mat-progress-spinner\r\n diameter=\"34\"\r\n mode=\"determinate\"\r\n [value]=\"refreshCountdown() * 20\">\r\n </mat-progress-spinner>\r\n <span class=\"countdown-number\">{{refreshCountdown()}}</span>\r\n </span>\r\n <span class=\"refresh-text\">\r\n <span class=\"refresh-label\">Apply Now</span>\r\n <span class=\"refresh-sub\">Preview updates in {{refreshCountdown()}}s</span>\r\n </span>\r\n <mat-icon class=\"refresh-chevron\">chevron_right</mat-icon>\r\n </button>\r\n }\r\n\r\n </mat-toolbar>\r\n</header>\r\n\r\n<!-- Main content with optimized loading -->\r\n@defer (on viewport) {\r\n<div class=\"container\">\r\n <div class=\"middle\">\r\n <br>\r\n @if (selectLoadingForm()) {\r\n <div class=\"loading-container\">\r\n <mat-spinner />\r\n </div>\r\n } @else {\r\n <lib-form-section-stepper />\r\n }\r\n <br>\r\n @if ((hasMissingConfigs()) && !(selectLoadingForm())) {\r\n <lib-missing-form-configs />\r\n }\r\n <!-- Updated time info -->\r\n @if (!(isNewForm())) {\r\n <div class=\"updated-time\">\r\n <mat-icon>update</mat-icon>\r\n <span>Updated {{ selectFormUpdated() }}</span>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (elementEditorOpen()) {\r\n <lib-input-editor style=\"max-width:480px;height:calc(100vh - 76px);\r\n position:sticky;\r\n top:76px;\r\n z-index:1\" cdkDrag cdkDragBoundary=\"container\" class=\"middle editor-container\" />\r\n }\r\n <!-- Missing fields section -->`\r\n\r\n\r\n</div>\r\n}@placeholder {\r\n<div style=\"padding: 50px;display:flex;justify-content:center;align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"50\" />\r\n</div>\r\n}", styles: [".container{display:flex;width:100%;height:calc(100% - 64px);padding-top:4em}.side{width:100px;background-color:var(--sem-error-surface)}.middle{flex-grow:1;height:calc(100vh - 68px);overflow:auto;background-color:none}.section-title-input{border:none;background-color:transparent;font-size:.8575em;font-weight:600;color:var(--lib-forms-on-primary);padding-top:12px;padding-bottom:12px;outline:none;width:100%;min-width:268px;transition:border-bottom-color .3s ease-in-out}.section-title-input:focus{border-bottom:1px solid var(--lib-forms-on-primary)}.missing-fields{position:fixed;bottom:0}.updated-time{display:flex;color:var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));gap:8px;align-items:center;line-height:normal;font-size:.875em;bottom:0;position:absolute;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);padding:8px;border-radius:4px}.nav-group{display:flex;align-items:center;gap:8px}.save-button{margin-left:8px;min-width:168px;height:44px}.save-button .save-text{display:flex;flex-direction:column;align-items:flex-start;gap:2px}.save-button .save-text .save-label{font-size:13px;font-weight:600;line-height:1;letter-spacing:.01em;white-space:nowrap}.save-button .save-text .save-sub{font-size:10px;line-height:1;opacity:.78;white-space:nowrap}.refresh-button{margin-left:8px;background:var(--mat-fab-small-container-color, var(--mat-sys-tertiary-container));color:var(--mat-sys-on-tertiary-container);border:1.5px solid var(--mat-sys-outline-variant);border-radius:10px;padding:4px 14px 4px 6px;cursor:pointer;display:inline-flex;align-items:center;gap:12px;height:44px;width:fit-content;box-shadow:0 2px 12px color-mix(in srgb,var(--lib-forms-shadow-color) 18%,transparent);transition:box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing),transform var(--lib-forms-duration-hover) var(--lib-forms-easing);outline:none;overflow:hidden;position:relative}.refresh-button:hover{box-shadow:0 4px 20px color-mix(in srgb,var(--lib-forms-shadow-color) 28%,transparent);transform:translateY(-1px)}.refresh-button:active{transform:translateY(0);box-shadow:0 1px 6px color-mix(in srgb,var(--lib-forms-shadow-color) 12%,transparent)}.refresh-button .countdown-ring{position:relative;width:34px;height:34px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.refresh-button .countdown-ring mat-progress-spinner{position:absolute;inset:0;--mdc-circular-progress-active-indicator-color: var(--mat-sys-on-tertiary-container);--mdc-circular-progress-track-color: color-mix(in srgb, var(--mat-sys-on-tertiary-container) 18%, transparent)}.refresh-button .countdown-ring .countdown-number{font-size:11px;font-weight:600;line-height:1;z-index:1;letter-spacing:-.3px;color:var(--mat-sys-on-tertiary-container)}.refresh-button .refresh-text{display:flex;flex-direction:column;align-items:flex-start;gap:3px}.refresh-button .refresh-text .refresh-label{font-size:13px;font-weight:600;line-height:1;letter-spacing:.01em;white-space:nowrap;color:var(--mat-sys-on-tertiary-container)}.refresh-button .refresh-text .refresh-sub{font-size:10px;line-height:1;opacity:.68;white-space:nowrap;color:var(--mat-sys-on-tertiary-container)}.refresh-button .refresh-chevron{font-size:18px;width:18px;height:18px;opacity:.65;flex-shrink:0;color:var(--mat-sys-on-tertiary-container)}.loading-container{display:flex;height:calc(100% - 150px);justify-content:center;align-items:center}.editor-container{max-width:500px}.divider{margin:0 8px;opacity:.5}app-missing-form-configs{position:absolute;bottom:0;right:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i7.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i7$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('./ngx-t-forms-forms-builder-menu.component-D_As34Ib.mjs').then(m => m.FormsBuilderMenuComponent)], () => [i3$1.MatIcon, i4.MatProgressSpinner, i1$2.CdkDrag, import('./ngx-t-forms-input-editor.component-B5eMJWrz.mjs').then(m => m.InputEditorComponent), import('./ngx-t-forms-form-section-stepper.component-DF3-s7Ou.mjs').then(m => m.FormSectionStepperComponent), import('./ngx-t-forms-missing-form-configs.component-DV55dGC2.mjs').then(m => m.MissingFormConfigsComponent)]] }); }
|
|
26752
27914
|
}
|
|
26753
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: FormBuilderComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-forms-builder-menu.component-
|
|
27915
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: FormBuilderComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-forms-builder-menu.component-D_As34Ib.mjs').then(m => m.FormsBuilderMenuComponent), import('./ngx-t-forms-input-editor.component-B5eMJWrz.mjs').then(m => m.InputEditorComponent), import('./ngx-t-forms-form-section-stepper.component-DF3-s7Ou.mjs').then(m => m.FormSectionStepperComponent), import('./ngx-t-forms-missing-form-configs.component-DV55dGC2.mjs').then(m => m.MissingFormConfigsComponent)], resolveMetadata: (FormsBuilderMenuComponent, InputEditorComponent, FormSectionStepperComponent, MissingFormConfigsComponent) => ({ decorators: [{
|
|
26754
27916
|
type: Component,
|
|
26755
27917
|
args: [{ selector: 'lib-form-builder, app-form-builder', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
26756
27918
|
CommonModule,
|
|
@@ -28131,9 +29293,9 @@ class TDynamicDataEditComponent {
|
|
|
28131
29293
|
}
|
|
28132
29294
|
}
|
|
28133
29295
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TDynamicDataEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
28134
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TDynamicDataEditComponent, isStandalone: true, selector: "lib-t-dynamic-data-edit", inputs: { editorConfig: { classPropertyName: "editorConfig", publicName: "editorConfig", isSignal: true, isRequired: false, transformFunction: null }, formInputs: { classPropertyName: "formInputs", publicName: "formInputs", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, validationErrors: { classPropertyName: "validationErrors", publicName: "validationErrors", isSignal: true, isRequired: false, transformFunction: null }, mscoaSaveCustomInput: { classPropertyName: "mscoaSaveCustomInput", publicName: "mscoaSaveCustomInput", isSignal: true, isRequired: false, transformFunction: null }, mscoaEditInput: { classPropertyName: "mscoaEditInput", publicName: "mscoaEditInput", isSignal: true, isRequired: false, transformFunction: null }, mscoaDeleteInput: { classPropertyName: "mscoaDeleteInput", publicName: "mscoaDeleteInput", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", blur: "blur" }, providers: [{ provide: NESTED_EDITOR_COMPONENT, useValue: TDynamicDataEditComponent }], ngImport: i0, template: "@defer {\n@if (( vm$ |async); as vm) {\n\n @if (vm.isFormFieldControl) {\n <!-- Editor types that resolve to a MatFormFieldControl render inside the field. -->\n <mat-form-field appearance=\"outline\" [color]=\"((validationErrors())||[]).length>0 ? 'warn' : 'primary'\"\n [floatLabel]=\"'always'\" [subscriptSizing]=\"'dynamic'\" [hintLabel]=\"vm.editorConfigValue?.hint||''\">\n <mat-label> {{ (vm. editorConfigValue)?.label }} </mat-label>\n @switch ((vm. editorConfigValue)?.editType) {\n @default {\n <lib-input-custom\n [id]=\"((vm.editorConfigValue)?.id)\"\n [inputConfig]=\"$any(vm.inputConfig)\"\n [placeholder]=\"(vm. editorConfigValue)?.placeholder ||'Enter value'\"\n [required]=\"!!(vm. editorConfigValue)?.required\"\n [disabled]=\"!!(vm.disabled)\"\n [ngModel]=\"(vm.value)\"\n (blur)=\"elementBlur($event)\"\n (input)=\"inputChange($event)\" ></lib-input-custom>\n\n\n }\n @case ( elementEditorTypes.Toggle) {\n <lib-mat-slider-toggle-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [name]=\"((vm. editorConfigValue)?.name||'') \"\n [label]=\"((vm. editorConfigValue)?.label||'')\" [disabled]=\"(vm.disabled)||false\"\n (valueChange)=\"valueChanged(!!$event)\" [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\">\n </lib-mat-slider-toggle-editor>\n\n }\n\n @case (elementEditorTypes.Range) {\n\n\n <lib-mat-slider-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [format]=\"( vm.editorConfigValue)?.format \" [formatLabel]=\" formatLabel\"\n [disabled]=\"(vm.disabled)||false\" [max]=\"( vm.editorConfigValue)?.max || 100\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [min]=\"( vm.editorConfigValue)?.min || 0\"\n (valueChange)=\"inputChange($event)\" [step]=\"( vm.editorConfigValue)?.step || 1\">\n\n\n </lib-mat-slider-editor>\n\n\n\n }\n\n @case (elementEditorTypes.OptionSelect) {\n\n <mat-select\n\n [value]=\"$any(vm.value)\" (selectionChange)=\"valueChanged($event.value)\"\n [disabled]=\"(vm.disabled)||false\">\n @for(option of ( vm.editorConfigValue)?.options || vm.dataOptions;track option.value){\n <mat-option [value]=\"option.value\">{{option.label}}</mat-option>\n }\n </mat-select>\n\n }\n\n @case (elementEditorTypes.RichTextEditor) {\n <!--\n Quill, NOT Editor.js. Two separate defects lived in the previous line:\n\n 1. It rendered `lib-editor-js-input`. Editor.js is deprecated here and\n must not be used for new work.\n 2. It passed `[inputConfig]=\"$any(data())\"` \u2014 the OBJECT BEING EDITED,\n not an `ITowerStepColumn`. The editor reads `placeholder`,\n `readonly` and `disabled` off that input and uses it to build its\n options, so it received a step/config object with none of them and\n initialised into an empty, toolbar-less box. The `$any()` is what\n let a completely unrelated shape through the type system.\n\n `richTextInputConfig()` supplies a real column config derived from this\n element's own editor config.\n -->\n <lib-quill-input\n [id]=\"((vm.editorConfigValue)?.id)\"\n [value]=\"$any(vm.value)\"\n (valueChanged)=\"valueChanged($event)\"\n [disabled]=\"(vm.disabled)||false\"\n [inputConfig]=\"richTextInputConfig()\"\n [bindings]=\"tokenBindings()\">\n </lib-quill-input>\n }\n\n @case (elementEditorTypes.TokenTextInput) {\n <lib-token-text-input\n [value]=\"$any(vm.value) || ''\"\n [bindings]=\"tokenBindings()\"\n [disabled]=\"(vm.disabled)||false\"\n [placeholder]=\"(vm.editorConfigValue)?.placeholder || ''\"\n (valueChange)=\"valueChanged($event)\">\n </lib-token-text-input>\n }\n\n @case (elementEditorTypes.MongoPipelineBuilder) {\n\n <lib-pipeline-generator [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [getWorkflowOptions]=\"getWorkflowOptions$\"\n (valueChanged)=\"valueChanged($event)\"></lib-pipeline-generator>\n\n }\n @case (elementEditorTypes.MapMatOptionsKeys) {\n <lib-map-mat-options-keys [disabled]=\"(vm.disabled)||false\"\n [value]=\"$any(vm.value)\"\n [formInputs]=\"formInputs() || []\"\n [mapToData]=\"vm.dataOptions\"\n [errors]=\"(validationErrors())||[]\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-map-mat-options-keys>\n\n }\n\n @case(elementEditorTypes.CalculatedFieldRules){\n\n <lib-calculated-field-rules [formInputs]=\"formInputs() ||[]\" [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\"\n [mapToData]=\"vm.dataOptions\"></lib-calculated-field-rules>\n }\n\n @case(elementEditorTypes.Validators){\n\n <lib-validators-config [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\"\n [mapToData]=\"vm.dataOptions\">\n </lib-validators-config>\n\n }\n\n @case(elementEditorTypes.ConditionalInputConfig){\n\n <lib-conditional-display-config [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\"\n [mapToData]=\"vm.dataOptions\">\n </lib-conditional-display-config>\n\n }\n @case(elementEditorTypes.ConfigMscoaAdditionalInputs){\n\n <lib-config-mscoa-additional-inputs [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [getMscoaTree]=\"getMscoaTree$\" [mapToData]=\"vm.dataOptions\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-config-mscoa-additional-inputs>\n\n }\n @case (elementEditorTypes.DataSourcePicker) {\n <lib-data-source-picker [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [editorConfig]=\"vm. editorConfigValue\"\n (valueChange)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\">\n </lib-data-source-picker>\n }\n @case (elementEditorTypes.ListLabelConfigEditor) {\n <lib-document-list-label-config-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [formInputs]=\"formInputs() ||[]\"\n [disabled]=\"(vm.disabled)||false\"\n [editorConfig]=\"vm. editorConfigValue\"\n (valueChange)=\"valueChanged($event)\"\n [value]=\"$any(vm.value)\" [mapToData]=\"vm.dataOptions\"\n [errors]=\"(validationErrors())||[]\">\n\n </lib-document-list-label-config-editor>\n }\n @case(\n elementEditorTypes.WorkflowPicker\n ){\n <lib-t-workflow-picker [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [getWorkflowOptions]=\"getWorkflowOptions$\"\n (valueChanged)=\"valueChanged($event)\" [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\"></lib-t-workflow-picker>\n }\n @case (\n elementEditorTypes.RecordListManager\n ) {\n <lib-record-list-manager\n [id]=\"((vm.editorConfigValue)?.id)\"\n [editorConfig]=\"vm.editorConfigValue\" [disabled]=\"(vm.disabled)||false\"\n [formInputs]=\"formInputs() ||[]\" [mapToData]=\"vm.dataOptions\" (valueChange)=\"valueChanged($event)\"\n\n [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\"></lib-record-list-manager>\n }\n }\n\n @if (vm.inputHasBlurFunction) {\n <button [matTooltip]=\"blurFunctionTooltip((vm.editorConfigValue)?.blurHandle)\"\n [disabled]=\"(vm.disabled)\" [color]=\"blurOff?'':'primary'\" (click)=\"blurOff=!blurOff\" matSuffix\n mat-icon-button>\n <mat-icon>{{\n blurOff?'blur_off':'blur_on'\n }}\n\n\n </mat-icon>\n </button>\n }\n </mat-form-field>\n } @else {\n <!-- Editor types backed by plain (signal-based) components render outside\n the field, since they are not MatFormFieldControls. They are wrapped to\n mirror the outline mat-form-field appearance: the fieldset draws the\n outline, its legend is the notched floating label, and the hint renders\n as a subscript below the box. -->\n <div class=\"non-control-editor\">\n <fieldset class=\"non-control-editor__field\">\n @if ((vm. editorConfigValue)?.label) {\n <legend class=\"non-control-editor__label\">{{ (vm. editorConfigValue)?.label }}</legend>\n }\n @switch ((vm. editorConfigValue)?.editType) {\n\n @case (elementEditorTypes.ChipSelect) {\n\n <lib-mat-chip-list-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [multiple]=\"!!vm.editorConfigValue?.multipleSelection\"\n [disabled]=\"(vm.disabled)||false\"\n [options]=\"(vm.editorConfigValue)?.options || vm.dataOptions\"\n [required]=\"!!( vm.editorConfigValue)?.required\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\"\n (valueChange)=\" valueChanged($event)\"></lib-mat-chip-list-editor>\n\n\n }\n\n @case (elementEditorTypes.SelectionOptions) {\n\n <lib-selection-options-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [errors]=\"(validationErrors())||[]\" [disabled]=\"(vm.disabled)||false\"\n [options]=\"$any(vm.value) || []\" (valueChanged)=\"valueChanged($event)\"></lib-selection-options-editor>\n }\n\n @case (\n elementEditorTypes.ApiCall) {\n\n <lib-rest-api-call-setup\n [id]=\"((vm.editorConfigValue)?.id)\"\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"(vm.editorConfigValue)?.httpGetDataFunction\" [disabled]=\"(vm.disabled)||false\"\n [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\">\n\n </lib-rest-api-call-setup>\n\n }\n\n @case (elementEditorTypes.ApiValueAccessRules) {\n\n\n\n <lib-api-value-access-rules [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\"\n [formInputs]=\"formInputs() ||[]\"\n\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\" [mapToData]=\"vm.dataOptions\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-api-value-access-rules>\n\n }\n\n @case (elementEditorTypes.FormInputSelector)\n {\n\n <lib-form-input-selector [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [formInputs]=\"formInputs() ||[]\"\n [errors]=\"(validationErrors())||[]\" [value]=\"$any(vm.value) || []\" (change)=\"valueChanged($event)\">\n </lib-form-input-selector>\n }\n\n @case (\n elementEditorTypes.RequiredInputs\n ){\n\n <lib-required-inputs [formInputs]=\"formInputs() ||[]\" [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\">\n </lib-required-inputs>\n }\n\n @case(elementEditorTypes.ConfigMscoaSegments){\n\n <lib-mscoa-segment-config [disabled]=\"(vm.disabled)||false\" [id]=\"((vm.editorConfigValue)?.id)\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [getMscoaTree]=\"getMscoaTree$\" [dataValue]=\"$any(vm.dataValue)\"\n [isCashSegmentConfig]=\"vm.editorConfigValue?.deepBind?.at(-1) === 'cashSegments'\"\n [saveCustomInput]=\"mscoaSaveCustomInput()\"\n [editSegmentInput]=\"mscoaEditInput()\"\n [deleteSegmentInput]=\"mscoaDeleteInput()\"\n [showAllSegments]=\"vm.dataOptions\" (valueChanged)=\"valueChanged($event)\"></lib-mscoa-segment-config>\n }\n @case (elementEditorTypes.ChipOptionsCreator) {\n <lib-chip-options-creator-editor [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" (valueChange)=\"valueChanged($event)\"\n [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\">\n\n </lib-chip-options-creator-editor>\n\n }\n @case (elementEditorTypes.FormPayloadProjection) {\n <lib-form-payload-projection [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-form-payload-projection>\n\n }\n\n @case (elementEditorTypes.PayloadTemplate) {\n <lib-payload-template-editor [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-payload-template-editor>\n\n }\n @case (elementEditorTypes.HeaderTemplate) {\n <lib-header-template-editor [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-header-template-editor>\n\n }\n @case (elementEditorTypes.QueryTemplate) {\n <lib-header-template-editor kind=\"query\" [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-header-template-editor>\n\n }\n @case (elementEditorTypes.MscoaConfig) {\n <lib-mscoa-config [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [dataValue]=\"$any(vm.dataValue)\" [getMscoaTree]=\"getMscoaTree$\"\n [saveCustomInput]=\"mscoaSaveCustomInput()\" [editSegmentInput]=\"mscoaEditInput()\"\n [deleteSegmentInput]=\"mscoaDeleteInput()\" [formInputs]=\"formInputs() ||[]\"\n [errors]=\"(validationErrors())||[]\" [id]=\"((vm.editorConfigValue)?.id)\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-mscoa-config>\n\n }\n @case (elementEditorTypes.ApiEndpointConfig) {\n <lib-api-endpoint-config [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [kind]=\"(vm.editorConfigValue)?.deepBind?.at(-1) === 'options' ? 'options' : 'value'\"\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"$any((vm.editorConfigValue)?.httpGetDataFunction)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-api-endpoint-config>\n\n }\n }\n </fieldset>\n\n @if ((vm. editorConfigValue)?.hint) {\n <small class=\"non-control-editor__hint\">{{ (vm. editorConfigValue)?.hint }}</small>\n }\n </div>\n }\n\n\n @for (error of (validationErrors())||[]; track $index) {\n <mat-error style=\" font-size: 0.75em;\n margin-left: 14px;\n \">\n\n {{error.message}}</mat-error>\n }\n\n}\n\n}@error {\n<mat-card>\n <mat-card-content>\n\n <span>\n Failed to load form inputs\n </span>\n </mat-card-content>\n</mat-card>\n}\n\n\n\n<!-- -\n `TableConfigSetup`\n\n- `MatrixTable`-->\n", styles: [".showItemValue{opacity:.6}.non-control-editor{display:flex;flex-direction:column;width:100%}.non-control-editor__field{margin:0;min-width:0;width:100%;box-sizing:border-box;display:flex;flex-direction:column;padding:.75rem;border:1px solid var(--lib-forms-outline-variant);border-radius:var(--mdc-outlined-text-field-container-shape, 4px);transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1)),box-shadow var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.non-control-editor__field:focus-within{border-color:var(--lib-forms-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.non-control-editor__label{padding:0 .25rem;margin-left:.5rem;font-size:.75rem;font-weight:400;line-height:1;color:var(--lib-forms-on-surface-variant)}.non-control-editor__hint{margin-top:.5rem;padding:0 .875rem;font-size:.75rem;line-height:1.5;color:var(--lib-forms-on-surface-variant)}mat-form-field{width:100%}mat-slider{width:100%}.range{display:flex;align-items:center}.elementInfo{display:flex;align-items:center;justify-content:center;padding:0;height:24px;width:24px}.infoIcon{font-size:1em;height:16px;width:16px}.toggle-label{margin-left:5px;align-items:center;display:flex;font-weight:500;line-height:normal;justify-content:space-between;color:var(--lib-forms-primary)}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$2.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('./ngx-t-forms-selection-options-editor.component-i0c0M02r.mjs').then(m => m.SelectionOptionsEditorComponent), import('./ngx-t-forms-form-input-selector.component-T3yqbRnV.mjs').then(m => m.FormInputSelectorComponent), import('./ngx-t-forms-rest-api-call-setup.component-CJyrmfYU.mjs').then(function (n) { return n.g; }).then(m => m.RestApiCallSetupComponent), Promise.resolve().then(function () { return apiValueAccessRules_component; }).then(m => m.ApiValueAccessRulesComponent), import('./ngx-t-forms-required-inputs.component-BUUrpNR0.mjs').then(m => m.RequiredInputsComponent), import('./ngx-t-forms-pipeline-generator.component-I2K-Csz3.mjs').then(m => m.PipelineGeneratorComponent), import('./ngx-t-forms-calculated-field-rules.component-BMheLioT.mjs').then(m => m.CalculatedFieldRulesComponent), import('./ngx-t-forms-validators-config.component-BvCwOCgs.mjs').then(m => m.ValidatorsConfigComponent), import('./ngx-t-forms-conditional-display-config.component-Cw7Axzql.mjs').then(m => m.ConditionalDisplayConfigComponent), import('./ngx-t-forms-config-mscoa-additional-inputs.component-Cacd0Sl8.mjs').then(m => m.ConfigMscoaAdditionalInputsComponent), import('./ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs').then(m => m.MatSliderEditorComponent), import('./ngx-t-forms-mscoa-segment-config.component-BcAgMwcV.mjs').then(m => m.MscoaSegmentConfigComponent), import('./ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs').then(m => m.MatSliderToggleEditorComponent), import('./ngx-t-forms-mat-chip-list-editor.component-1YdhWOqQ.mjs').then(m => m.MatChipListEditorComponent), i2$1.MatFormField, i2$1.MatLabel, i2$1.MatError, i2$1.MatSuffix, i8$1.MatSelect, i8$1.MatOption, i2.MatIconButton, i3$1.MatIcon, i5.MatTooltip, import('./ngx-t-forms-chip-options-creator-editor.component-mPoQRw0c.mjs').then(m => m.ChipOptionsCreatorEditorComponent), import('./ngx-t-forms-data-source-picker.component-CwQgtKfU.mjs').then(m => m.DataSourcePickerComponent), import('./ngx-t-forms-document-list-label-config-editor.component-CZ-XFrjM.mjs').then(m => m.DocumentListLabelConfigEditorComponent), import('./ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs').then(m => m.TWorkflowPickerComponent), import('./ngx-t-forms-quill-input.component-BrOSKvq1.mjs').then(function (n) { return n.q; }).then(m => m.QuillInputComponent), import('./ngx-t-forms-token-text-input.component-B0_C_BSx.mjs').then(m => m.TokenTextInputComponent), import('./ngx-t-forms-record-list-manager.component-BEeTQy5N.mjs').then(m => m.RecordListManagerComponent), import('./ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs').then(m => m.FormPayloadProjectionComponent), import('./ngx-t-forms-payload-template-editor.component-CY7BRHuw.mjs').then(m => m.PayloadTemplateEditorComponent), import('./ngx-t-forms-header-template-editor.component-D9lka3Y5.mjs').then(m => m.HeaderTemplateEditorComponent), import('./ngx-t-forms-api-endpoint-config.component-Bt7rWYJq.mjs').then(m => m.ApiEndpointConfigComponent), import('./ngx-t-forms-mscoa-config.component-CyG4Lafw.mjs').then(m => m.MscoaConfigComponent), import('./ngx-t-forms-input-custom.component-45DTVv-R.mjs').then(m => m.InputCustomComponent), i1$1.NgControlStatus, i1$1.RequiredValidator, i1$1.NgModel, import('./ngx-t-forms-map-mat-options-keys-DvrLH9wd.mjs').then(m => m.MapMatOptionsKeys), import('@angular/common').then(m => m.AsyncPipe)]] }); }
|
|
29296
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TDynamicDataEditComponent, isStandalone: true, selector: "lib-t-dynamic-data-edit", inputs: { editorConfig: { classPropertyName: "editorConfig", publicName: "editorConfig", isSignal: true, isRequired: false, transformFunction: null }, formInputs: { classPropertyName: "formInputs", publicName: "formInputs", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, validationErrors: { classPropertyName: "validationErrors", publicName: "validationErrors", isSignal: true, isRequired: false, transformFunction: null }, mscoaSaveCustomInput: { classPropertyName: "mscoaSaveCustomInput", publicName: "mscoaSaveCustomInput", isSignal: true, isRequired: false, transformFunction: null }, mscoaEditInput: { classPropertyName: "mscoaEditInput", publicName: "mscoaEditInput", isSignal: true, isRequired: false, transformFunction: null }, mscoaDeleteInput: { classPropertyName: "mscoaDeleteInput", publicName: "mscoaDeleteInput", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", blur: "blur" }, providers: [{ provide: NESTED_EDITOR_COMPONENT, useValue: TDynamicDataEditComponent }], ngImport: i0, template: "@defer {\n@if (( vm$ |async); as vm) {\n\n @if (vm.isFormFieldControl) {\n <!-- Editor types that resolve to a MatFormFieldControl render inside the field. -->\n <mat-form-field appearance=\"outline\" [color]=\"((validationErrors())||[]).length>0 ? 'warn' : 'primary'\"\n [floatLabel]=\"'always'\" [subscriptSizing]=\"'dynamic'\" [hintLabel]=\"vm.editorConfigValue?.hint||''\">\n <mat-label> {{ (vm. editorConfigValue)?.label }} </mat-label>\n @switch ((vm. editorConfigValue)?.editType) {\n @default {\n <lib-input-custom\n [id]=\"((vm.editorConfigValue)?.id)\"\n [inputConfig]=\"$any(vm.inputConfig)\"\n [placeholder]=\"(vm. editorConfigValue)?.placeholder ||'Enter value'\"\n [required]=\"!!(vm. editorConfigValue)?.required\"\n [disabled]=\"!!(vm.disabled)\"\n [ngModel]=\"(vm.value)\"\n (blur)=\"elementBlur($event)\"\n (input)=\"inputChange($event)\" ></lib-input-custom>\n\n\n }\n @case ( elementEditorTypes.Toggle) {\n <lib-mat-slider-toggle-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [name]=\"((vm. editorConfigValue)?.name||'') \"\n [label]=\"((vm. editorConfigValue)?.label||'')\" [disabled]=\"(vm.disabled)||false\"\n (valueChange)=\"valueChanged(!!$event)\" [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\">\n </lib-mat-slider-toggle-editor>\n\n }\n\n @case (elementEditorTypes.Range) {\n\n\n <lib-mat-slider-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [format]=\"( vm.editorConfigValue)?.format \" [formatLabel]=\" formatLabel\"\n [disabled]=\"(vm.disabled)||false\" [max]=\"( vm.editorConfigValue)?.max || 100\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [min]=\"( vm.editorConfigValue)?.min || 0\"\n (valueChange)=\"inputChange($event)\" [step]=\"( vm.editorConfigValue)?.step || 1\">\n\n\n </lib-mat-slider-editor>\n\n\n\n }\n\n @case (elementEditorTypes.OptionSelect) {\n\n <mat-select\n\n [value]=\"$any(vm.value)\" (selectionChange)=\"valueChanged($event.value)\"\n [disabled]=\"(vm.disabled)||false\">\n @for(option of ( vm.editorConfigValue)?.options || vm.dataOptions;track option.value){\n <mat-option [value]=\"option.value\">{{option.label}}</mat-option>\n }\n </mat-select>\n\n }\n\n @case (elementEditorTypes.RichTextEditor) {\n <!--\n Quill, NOT Editor.js. Two separate defects lived in the previous line:\n\n 1. It rendered `lib-editor-js-input`. Editor.js is deprecated here and\n must not be used for new work.\n 2. It passed `[inputConfig]=\"$any(data())\"` \u2014 the OBJECT BEING EDITED,\n not an `ITowerStepColumn`. The editor reads `placeholder`,\n `readonly` and `disabled` off that input and uses it to build its\n options, so it received a step/config object with none of them and\n initialised into an empty, toolbar-less box. The `$any()` is what\n let a completely unrelated shape through the type system.\n\n `richTextInputConfig()` supplies a real column config derived from this\n element's own editor config.\n -->\n <lib-quill-input\n [id]=\"((vm.editorConfigValue)?.id)\"\n [value]=\"$any(vm.value)\"\n (valueChanged)=\"valueChanged($event)\"\n [disabled]=\"(vm.disabled)||false\"\n [inputConfig]=\"richTextInputConfig()\"\n [bindings]=\"tokenBindings()\">\n </lib-quill-input>\n }\n\n @case (elementEditorTypes.TokenTextInput) {\n <lib-token-text-input\n [value]=\"$any(vm.value) || ''\"\n [bindings]=\"tokenBindings()\"\n [disabled]=\"(vm.disabled)||false\"\n [placeholder]=\"(vm.editorConfigValue)?.placeholder || ''\"\n (valueChange)=\"valueChanged($event)\">\n </lib-token-text-input>\n }\n\n @case (elementEditorTypes.MongoPipelineBuilder) {\n\n <lib-pipeline-generator [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [getWorkflowOptions]=\"getWorkflowOptions$\"\n (valueChanged)=\"valueChanged($event)\"></lib-pipeline-generator>\n\n }\n @case (elementEditorTypes.MapMatOptionsKeys) {\n <lib-map-mat-options-keys [disabled]=\"(vm.disabled)||false\"\n [value]=\"$any(vm.value)\"\n [formInputs]=\"formInputs() || []\"\n [mapToData]=\"vm.dataOptions\"\n [errors]=\"(validationErrors())||[]\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-map-mat-options-keys>\n\n }\n\n @case(elementEditorTypes.CalculatedFieldRules){\n\n <lib-calculated-field-rules [formInputs]=\"formInputs() ||[]\" [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\"\n [mapToData]=\"vm.dataOptions\"></lib-calculated-field-rules>\n }\n\n @case(elementEditorTypes.Validators){\n\n <lib-validators-config [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\"\n [mapToData]=\"vm.dataOptions\">\n </lib-validators-config>\n\n }\n\n @case(elementEditorTypes.ConditionalInputConfig){\n\n <lib-conditional-display-config [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\"\n [mapToData]=\"vm.dataOptions\">\n </lib-conditional-display-config>\n\n }\n @case(elementEditorTypes.ConfigMscoaAdditionalInputs){\n\n <lib-config-mscoa-additional-inputs [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [getMscoaTree]=\"getMscoaTree$\" [mapToData]=\"vm.dataOptions\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-config-mscoa-additional-inputs>\n\n }\n @case (elementEditorTypes.DataSourcePicker) {\n <lib-data-source-picker [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [editorConfig]=\"vm. editorConfigValue\"\n (valueChange)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\">\n </lib-data-source-picker>\n }\n @case (elementEditorTypes.ListLabelConfigEditor) {\n <lib-document-list-label-config-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [formInputs]=\"formInputs() ||[]\"\n [disabled]=\"(vm.disabled)||false\"\n [editorConfig]=\"vm. editorConfigValue\"\n (valueChange)=\"valueChanged($event)\"\n [value]=\"$any(vm.value)\" [mapToData]=\"vm.dataOptions\"\n [errors]=\"(validationErrors())||[]\">\n\n </lib-document-list-label-config-editor>\n }\n @case(\n elementEditorTypes.WorkflowPicker\n ){\n <lib-t-workflow-picker [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [getWorkflowOptions]=\"getWorkflowOptions$\"\n (valueChanged)=\"valueChanged($event)\" [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\"></lib-t-workflow-picker>\n }\n @case (\n elementEditorTypes.RecordListManager\n ) {\n <lib-record-list-manager\n [id]=\"((vm.editorConfigValue)?.id)\"\n [editorConfig]=\"vm.editorConfigValue\" [disabled]=\"(vm.disabled)||false\"\n [formInputs]=\"formInputs() ||[]\" [mapToData]=\"vm.dataOptions\" (valueChange)=\"valueChanged($event)\"\n\n [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\"></lib-record-list-manager>\n }\n }\n\n @if (vm.inputHasBlurFunction) {\n <button [matTooltip]=\"blurFunctionTooltip((vm.editorConfigValue)?.blurHandle)\"\n [disabled]=\"(vm.disabled)\" [color]=\"blurOff?'':'primary'\" (click)=\"blurOff=!blurOff\" matSuffix\n mat-icon-button>\n <mat-icon>{{\n blurOff?'blur_off':'blur_on'\n }}\n\n\n </mat-icon>\n </button>\n }\n </mat-form-field>\n } @else {\n <!-- Editor types backed by plain (signal-based) components render outside\n the field, since they are not MatFormFieldControls. They are wrapped to\n mirror the outline mat-form-field appearance: the fieldset draws the\n outline, its legend is the notched floating label, and the hint renders\n as a subscript below the box. -->\n <div class=\"non-control-editor\">\n <fieldset class=\"non-control-editor__field\">\n @if ((vm. editorConfigValue)?.label) {\n <legend class=\"non-control-editor__label\">{{ (vm. editorConfigValue)?.label }}</legend>\n }\n @switch ((vm. editorConfigValue)?.editType) {\n\n @case (elementEditorTypes.ChipSelect) {\n\n <lib-mat-chip-list-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [multiple]=\"!!vm.editorConfigValue?.multipleSelection\"\n [disabled]=\"(vm.disabled)||false\"\n [options]=\"(vm.editorConfigValue)?.options || vm.dataOptions\"\n [required]=\"!!( vm.editorConfigValue)?.required\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\"\n (valueChange)=\" valueChanged($event)\"></lib-mat-chip-list-editor>\n\n\n }\n\n @case (elementEditorTypes.SelectionOptions) {\n\n <lib-selection-options-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [errors]=\"(validationErrors())||[]\" [disabled]=\"(vm.disabled)||false\"\n [options]=\"$any(vm.value) || []\" (valueChanged)=\"valueChanged($event)\"></lib-selection-options-editor>\n }\n\n @case (\n elementEditorTypes.ApiCall) {\n\n <lib-rest-api-call-setup\n [id]=\"((vm.editorConfigValue)?.id)\"\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"(vm.editorConfigValue)?.httpGetDataFunction\" [disabled]=\"(vm.disabled)||false\"\n [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\">\n\n </lib-rest-api-call-setup>\n\n }\n\n @case (elementEditorTypes.ApiValueAccessRules) {\n\n\n\n <lib-api-value-access-rules [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\"\n [formInputs]=\"formInputs() ||[]\"\n\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\" [mapToData]=\"vm.dataOptions\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-api-value-access-rules>\n\n }\n\n @case (elementEditorTypes.FormInputSelector)\n {\n\n <lib-form-input-selector [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [formInputs]=\"formInputs() ||[]\"\n [errors]=\"(validationErrors())||[]\" [value]=\"$any(vm.value) || []\" (change)=\"valueChanged($event)\">\n </lib-form-input-selector>\n }\n\n @case (\n elementEditorTypes.RequiredInputs\n ){\n\n <lib-required-inputs [formInputs]=\"formInputs() ||[]\" [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\">\n </lib-required-inputs>\n }\n\n @case(elementEditorTypes.ConfigMscoaSegments){\n\n <lib-mscoa-segment-config [disabled]=\"(vm.disabled)||false\" [id]=\"((vm.editorConfigValue)?.id)\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [getMscoaTree]=\"getMscoaTree$\" [dataValue]=\"$any(vm.dataValue)\"\n [isCashSegmentConfig]=\"vm.editorConfigValue?.deepBind?.at(-1) === 'cashSegments'\"\n [saveCustomInput]=\"mscoaSaveCustomInput()\"\n [editSegmentInput]=\"mscoaEditInput()\"\n [deleteSegmentInput]=\"mscoaDeleteInput()\"\n [showAllSegments]=\"vm.dataOptions\" (valueChanged)=\"valueChanged($event)\"></lib-mscoa-segment-config>\n }\n @case (elementEditorTypes.ChipOptionsCreator) {\n <lib-chip-options-creator-editor [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" (valueChange)=\"valueChanged($event)\"\n [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\">\n\n </lib-chip-options-creator-editor>\n\n }\n @case (elementEditorTypes.FormPayloadProjection) {\n <lib-form-payload-projection [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-form-payload-projection>\n\n }\n\n @case (elementEditorTypes.PayloadTemplate) {\n <lib-payload-template-editor [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-payload-template-editor>\n\n }\n @case (elementEditorTypes.HeaderTemplate) {\n <lib-header-template-editor [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-header-template-editor>\n\n }\n @case (elementEditorTypes.QueryTemplate) {\n <lib-header-template-editor kind=\"query\" [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-header-template-editor>\n\n }\n @case (elementEditorTypes.MscoaConfig) {\n <lib-mscoa-config [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [dataValue]=\"$any(vm.dataValue)\" [getMscoaTree]=\"getMscoaTree$\"\n [saveCustomInput]=\"mscoaSaveCustomInput()\" [editSegmentInput]=\"mscoaEditInput()\"\n [deleteSegmentInput]=\"mscoaDeleteInput()\" [formInputs]=\"formInputs() ||[]\"\n [errors]=\"(validationErrors())||[]\" [id]=\"((vm.editorConfigValue)?.id)\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-mscoa-config>\n\n }\n @case (elementEditorTypes.ApiEndpointConfig) {\n <lib-api-endpoint-config [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [kind]=\"(vm.editorConfigValue)?.deepBind?.at(-1) === 'options' ? 'options' : 'value'\"\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"$any((vm.editorConfigValue)?.httpGetDataFunction)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-api-endpoint-config>\n\n }\n }\n </fieldset>\n\n @if ((vm. editorConfigValue)?.hint) {\n <small class=\"non-control-editor__hint\">{{ (vm. editorConfigValue)?.hint }}</small>\n }\n </div>\n }\n\n\n @for (error of (validationErrors())||[]; track $index) {\n <mat-error style=\" font-size: 0.75em;\n margin-left: 14px;\n \">\n\n {{error.message}}</mat-error>\n }\n\n}\n\n}@error {\n<mat-card>\n <mat-card-content>\n\n <span>\n Failed to load form inputs\n </span>\n </mat-card-content>\n</mat-card>\n}\n\n\n\n<!-- -\n `TableConfigSetup`\n\n- `MatrixTable`-->\n", styles: [".showItemValue{opacity:.6}.non-control-editor{display:flex;flex-direction:column;width:100%}.non-control-editor__field{margin:0;min-width:0;width:100%;box-sizing:border-box;display:flex;flex-direction:column;padding:.75rem;border:1px solid var(--lib-forms-outline-variant);border-radius:var(--mdc-outlined-text-field-container-shape, 4px);transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1)),box-shadow var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.non-control-editor__field:focus-within{border-color:var(--lib-forms-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.non-control-editor__label{padding:0 .25rem;margin-left:.5rem;font-size:.75rem;font-weight:400;line-height:1;color:var(--lib-forms-on-surface-variant)}.non-control-editor__hint{margin-top:.5rem;padding:0 .875rem;font-size:.75rem;line-height:1.5;color:var(--lib-forms-on-surface-variant)}mat-form-field{width:100%}mat-slider{width:100%}.range{display:flex;align-items:center}.elementInfo{display:flex;align-items:center;justify-content:center;padding:0;height:24px;width:24px}.infoIcon{font-size:1em;height:16px;width:16px}.toggle-label{margin-left:5px;align-items:center;display:flex;font-weight:500;line-height:normal;justify-content:space-between;color:var(--lib-forms-primary)}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$2.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('./ngx-t-forms-selection-options-editor.component-BfaTlXQU.mjs').then(m => m.SelectionOptionsEditorComponent), import('./ngx-t-forms-form-input-selector.component-HjtfeAew.mjs').then(m => m.FormInputSelectorComponent), import('./ngx-t-forms-rest-api-call-setup.component-a4z2V-a1.mjs').then(function (n) { return n.g; }).then(m => m.RestApiCallSetupComponent), Promise.resolve().then(function () { return apiValueAccessRules_component; }).then(m => m.ApiValueAccessRulesComponent), import('./ngx-t-forms-required-inputs.component-CtUXVAvg.mjs').then(m => m.RequiredInputsComponent), import('./ngx-t-forms-pipeline-generator.component-Bc8En673.mjs').then(m => m.PipelineGeneratorComponent), import('./ngx-t-forms-calculated-field-rules.component-CMOyxJ4K.mjs').then(m => m.CalculatedFieldRulesComponent), import('./ngx-t-forms-validators-config.component-yq3EGgU2.mjs').then(m => m.ValidatorsConfigComponent), import('./ngx-t-forms-conditional-display-config.component-DSyIhkWf.mjs').then(m => m.ConditionalDisplayConfigComponent), import('./ngx-t-forms-config-mscoa-additional-inputs.component-DSUAcg8R.mjs').then(m => m.ConfigMscoaAdditionalInputsComponent), import('./ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs').then(m => m.MatSliderEditorComponent), import('./ngx-t-forms-mscoa-segment-config.component-7w9J1RgE.mjs').then(m => m.MscoaSegmentConfigComponent), import('./ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs').then(m => m.MatSliderToggleEditorComponent), import('./ngx-t-forms-mat-chip-list-editor.component-lv4MlFT8.mjs').then(m => m.MatChipListEditorComponent), i2$1.MatFormField, i2$1.MatLabel, i2$1.MatError, i2$1.MatSuffix, i8$1.MatSelect, i8$1.MatOption, i2.MatIconButton, i3$1.MatIcon, i5.MatTooltip, import('./ngx-t-forms-chip-options-creator-editor.component-D2LhKaem.mjs').then(m => m.ChipOptionsCreatorEditorComponent), import('./ngx-t-forms-data-source-picker.component-h_e5wDIJ.mjs').then(m => m.DataSourcePickerComponent), import('./ngx-t-forms-document-list-label-config-editor.component-BvQoKyeP.mjs').then(m => m.DocumentListLabelConfigEditorComponent), import('./ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs').then(m => m.TWorkflowPickerComponent), import('./ngx-t-forms-quill-input.component-CN3aorpW.mjs').then(function (n) { return n.q; }).then(m => m.QuillInputComponent), import('./ngx-t-forms-token-text-input.component-B1I95sk3.mjs').then(m => m.TokenTextInputComponent), import('./ngx-t-forms-record-list-manager.component-CpyrWNo5.mjs').then(m => m.RecordListManagerComponent), import('./ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs').then(m => m.FormPayloadProjectionComponent), import('./ngx-t-forms-payload-template-editor.component-DM4-3jzA.mjs').then(m => m.PayloadTemplateEditorComponent), import('./ngx-t-forms-header-template-editor.component-D78_YC80.mjs').then(m => m.HeaderTemplateEditorComponent), import('./ngx-t-forms-api-endpoint-config.component-Di79aHfa.mjs').then(m => m.ApiEndpointConfigComponent), import('./ngx-t-forms-mscoa-config.component-BqgTVHRS.mjs').then(m => m.MscoaConfigComponent), import('./ngx-t-forms-input-custom.component-BrZ59sIz.mjs').then(m => m.InputCustomComponent), i1$1.NgControlStatus, i1$1.RequiredValidator, i1$1.NgModel, import('./ngx-t-forms-map-mat-options-keys-BOX1dYlB.mjs').then(m => m.MapMatOptionsKeys), import('@angular/common').then(m => m.AsyncPipe)]] }); }
|
|
28135
29297
|
}
|
|
28136
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: TDynamicDataEditComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-selection-options-editor.component-
|
|
29298
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: TDynamicDataEditComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-selection-options-editor.component-BfaTlXQU.mjs').then(m => m.SelectionOptionsEditorComponent), import('./ngx-t-forms-form-input-selector.component-HjtfeAew.mjs').then(m => m.FormInputSelectorComponent), import('./ngx-t-forms-rest-api-call-setup.component-a4z2V-a1.mjs').then(function (n) { return n.g; }).then(m => m.RestApiCallSetupComponent), Promise.resolve().then(function () { return apiValueAccessRules_component; }).then(m => m.ApiValueAccessRulesComponent), import('./ngx-t-forms-required-inputs.component-CtUXVAvg.mjs').then(m => m.RequiredInputsComponent), import('./ngx-t-forms-pipeline-generator.component-Bc8En673.mjs').then(m => m.PipelineGeneratorComponent), import('./ngx-t-forms-calculated-field-rules.component-CMOyxJ4K.mjs').then(m => m.CalculatedFieldRulesComponent), import('./ngx-t-forms-validators-config.component-yq3EGgU2.mjs').then(m => m.ValidatorsConfigComponent), import('./ngx-t-forms-conditional-display-config.component-DSyIhkWf.mjs').then(m => m.ConditionalDisplayConfigComponent), import('./ngx-t-forms-config-mscoa-additional-inputs.component-DSUAcg8R.mjs').then(m => m.ConfigMscoaAdditionalInputsComponent), import('./ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs').then(m => m.MatSliderEditorComponent), import('./ngx-t-forms-mscoa-segment-config.component-7w9J1RgE.mjs').then(m => m.MscoaSegmentConfigComponent), import('./ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs').then(m => m.MatSliderToggleEditorComponent), import('./ngx-t-forms-mat-chip-list-editor.component-lv4MlFT8.mjs').then(m => m.MatChipListEditorComponent), import('./ngx-t-forms-chip-options-creator-editor.component-D2LhKaem.mjs').then(m => m.ChipOptionsCreatorEditorComponent), import('./ngx-t-forms-data-source-picker.component-h_e5wDIJ.mjs').then(m => m.DataSourcePickerComponent), import('./ngx-t-forms-document-list-label-config-editor.component-BvQoKyeP.mjs').then(m => m.DocumentListLabelConfigEditorComponent), import('./ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs').then(m => m.TWorkflowPickerComponent), import('./ngx-t-forms-quill-input.component-CN3aorpW.mjs').then(function (n) { return n.q; }).then(m => m.QuillInputComponent), import('./ngx-t-forms-token-text-input.component-B1I95sk3.mjs').then(m => m.TokenTextInputComponent), import('./ngx-t-forms-record-list-manager.component-CpyrWNo5.mjs').then(m => m.RecordListManagerComponent), import('./ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs').then(m => m.FormPayloadProjectionComponent), import('./ngx-t-forms-payload-template-editor.component-DM4-3jzA.mjs').then(m => m.PayloadTemplateEditorComponent), import('./ngx-t-forms-header-template-editor.component-D78_YC80.mjs').then(m => m.HeaderTemplateEditorComponent), import('./ngx-t-forms-api-endpoint-config.component-Di79aHfa.mjs').then(m => m.ApiEndpointConfigComponent), import('./ngx-t-forms-mscoa-config.component-BqgTVHRS.mjs').then(m => m.MscoaConfigComponent), import('./ngx-t-forms-input-custom.component-BrZ59sIz.mjs').then(m => m.InputCustomComponent), import('./ngx-t-forms-map-mat-options-keys-BOX1dYlB.mjs').then(m => m.MapMatOptionsKeys), import('@angular/common').then(m => m.AsyncPipe)], resolveMetadata: (SelectionOptionsEditorComponent, FormInputSelectorComponent, RestApiCallSetupComponent, ApiValueAccessRulesComponent, RequiredInputsComponent, PipelineGeneratorComponent, CalculatedFieldRulesComponent, ValidatorsConfigComponent, ConditionalDisplayConfigComponent, ConfigMscoaAdditionalInputsComponent, MatSliderEditorComponent, MscoaSegmentConfigComponent, MatSliderToggleEditorComponent, MatChipListEditorComponent, ChipOptionsCreatorEditorComponent, DataSourcePickerComponent, DocumentListLabelConfigEditorComponent, TWorkflowPickerComponent, QuillInputComponent, TokenTextInputComponent, RecordListManagerComponent, FormPayloadProjectionComponent, PayloadTemplateEditorComponent, HeaderTemplateEditorComponent, ApiEndpointConfigComponent, MscoaConfigComponent, InputCustomComponent, MapMatOptionsKeys, AsyncPipe) => ({ decorators: [{
|
|
28137
29299
|
type: Component,
|
|
28138
29300
|
args: [{ selector: 'lib-t-dynamic-data-edit', imports: [
|
|
28139
29301
|
AsyncPipe,
|
|
@@ -29450,44 +30612,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
29450
30612
|
const ELEMENT_REGISTRY = {
|
|
29451
30613
|
[ElementTypes.Location]: {
|
|
29452
30614
|
builderAware: true,
|
|
29453
|
-
load: () => import('./ngx-t-forms-geo-location.component-
|
|
30615
|
+
load: () => import('./ngx-t-forms-geo-location.component-BGg8uGQV.mjs').then(m => m.GeoLocationComponent),
|
|
29454
30616
|
},
|
|
29455
30617
|
[ElementTypes.AutoCompleteInput]: {
|
|
29456
|
-
load: () => import('./ngx-t-forms-auto-complete-input-element.component-
|
|
30618
|
+
load: () => import('./ngx-t-forms-auto-complete-input-element.component-DJ84laIO.mjs').then(m => m.AutoCompleteInputElementComponent),
|
|
29457
30619
|
},
|
|
29458
30620
|
[ElementTypes.Toggle]: {
|
|
29459
|
-
load: () => import('./ngx-t-forms-toggle-input-element.component-
|
|
30621
|
+
load: () => import('./ngx-t-forms-toggle-input-element.component-Cku3HoDl.mjs').then(m => m.ToggleInputElementComponent),
|
|
29460
30622
|
},
|
|
29461
30623
|
[ElementTypes.Select]: {
|
|
29462
|
-
load: () => import('./ngx-t-forms-select-input-element.component-
|
|
30624
|
+
load: () => import('./ngx-t-forms-select-input-element.component-Bwlqr26x.mjs').then(m => m.SelectInputElementComponent),
|
|
29463
30625
|
},
|
|
29464
30626
|
[ElementTypes.Textarea]: {
|
|
29465
|
-
load: () => import('./ngx-t-forms-textarea-input-element.component-
|
|
30627
|
+
load: () => import('./ngx-t-forms-textarea-input-element.component-B35jrn-j.mjs').then(m => m.TextareaInputElementComponent),
|
|
29466
30628
|
},
|
|
29467
30629
|
[ElementTypes.DateRangePicker]: {
|
|
29468
|
-
load: () => import('./ngx-t-forms-date-range-picker-input-element.component-
|
|
30630
|
+
load: () => import('./ngx-t-forms-date-range-picker-input-element.component-DLeCZF3n.mjs').then(m => m.DateRangePickerInputElementComponent),
|
|
29469
30631
|
},
|
|
29470
30632
|
[ElementTypes.DatePicker]: {
|
|
29471
|
-
load: () => import('./ngx-t-forms-date-picker-input-element.component-
|
|
30633
|
+
load: () => import('./ngx-t-forms-date-picker-input-element.component-BPoqT0as.mjs').then(m => m.DatePickerInputElementComponent),
|
|
29472
30634
|
},
|
|
29473
30635
|
[ElementTypes.DateTimePicker]: {
|
|
29474
|
-
load: () => import('./ngx-t-forms-date-time-picker-input-element.component-
|
|
30636
|
+
load: () => import('./ngx-t-forms-date-time-picker-input-element.component-D2kj-knT.mjs').then(m => m.DateTimePickerInputElementComponent),
|
|
29475
30637
|
},
|
|
29476
30638
|
[ElementTypes.FileUpload]: {
|
|
29477
|
-
load: () => import('./ngx-t-forms-file-upload-input-element.component-
|
|
30639
|
+
load: () => import('./ngx-t-forms-file-upload-input-element.component-Dv21OQ8v.mjs').then(m => m.FileUploadInputElementComponent),
|
|
29478
30640
|
},
|
|
29479
30641
|
[ElementTypes.ImageCapture]: {
|
|
29480
|
-
load: () => import('./ngx-t-forms-image-capture-input-element.component-
|
|
30642
|
+
load: () => import('./ngx-t-forms-image-capture-input-element.component-B2ldh1-n.mjs').then(m => m.ImageCaptureInputElementComponent),
|
|
29481
30643
|
},
|
|
29482
30644
|
[ElementTypes.Editor]: {
|
|
29483
|
-
load: () => import('./ngx-t-forms-editor-input-element.component-
|
|
30645
|
+
load: () => import('./ngx-t-forms-editor-input-element.component-DlIfYjsU.mjs').then(m => m.EditorInputElementComponent),
|
|
29484
30646
|
},
|
|
29485
30647
|
[ElementTypes.Signature]: {
|
|
29486
30648
|
load: () => Promise.resolve().then(function () { return signatureInputElement_component; }).then(m => m.SignatureInputElementComponent),
|
|
29487
30649
|
},
|
|
29488
30650
|
[ElementTypes.MultipleInput]: {
|
|
29489
30651
|
builderAware: true,
|
|
29490
|
-
load: () => import('./ngx-t-forms-multiple-input-input-element.component-
|
|
30652
|
+
load: () => import('./ngx-t-forms-multiple-input-input-element.component-BbbRpwPw.mjs').then(m => m.MultipleInputInputElementComponent),
|
|
29491
30653
|
},
|
|
29492
30654
|
[ElementTypes.MscoaSelection]: {
|
|
29493
30655
|
builderAware: true,
|
|
@@ -29495,14 +30657,14 @@ const ELEMENT_REGISTRY = {
|
|
|
29495
30657
|
},
|
|
29496
30658
|
[ElementTypes.WorkflowDocumentPicker]: {
|
|
29497
30659
|
builderAware: true,
|
|
29498
|
-
load: () => import('./ngx-t-forms-document-picker.component-
|
|
30660
|
+
load: () => import('./ngx-t-forms-document-picker.component-D0hW0jUu.mjs').then(m => m.DocumentPickerComponent),
|
|
29499
30661
|
},
|
|
29500
30662
|
[ElementTypes.WorkflowAdjudication]: {
|
|
29501
30663
|
builderAware: true,
|
|
29502
|
-
load: () => import('./ngx-t-forms-workflow-adjudication.component-
|
|
30664
|
+
load: () => import('./ngx-t-forms-workflow-adjudication.component-CZZX1hYU.mjs').then(m => m.WorkflowAdjudicationComponent),
|
|
29503
30665
|
},
|
|
29504
30666
|
[ElementTypes.PaginatedSelectionTable]: {
|
|
29505
|
-
load: () => import('./ngx-t-forms-paginated-selection-table-
|
|
30667
|
+
load: () => import('./ngx-t-forms-paginated-selection-table-DisWM3sL.mjs').then(m => m.PaginatedSelectionTable),
|
|
29506
30668
|
},
|
|
29507
30669
|
};
|
|
29508
30670
|
/**
|
|
@@ -29510,7 +30672,7 @@ const ELEMENT_REGISTRY = {
|
|
|
29510
30672
|
* `@default` switch branch (a basic input).
|
|
29511
30673
|
*/
|
|
29512
30674
|
const FALLBACK_ELEMENT = {
|
|
29513
|
-
load: () => import('./ngx-t-forms-basic-input-input-element.component-
|
|
30675
|
+
load: () => import('./ngx-t-forms-basic-input-input-element.component-1wixvEKK.mjs').then(m => m.BasicInputInputElementComponent),
|
|
29514
30676
|
};
|
|
29515
30677
|
/**
|
|
29516
30678
|
* Resolves the renderer entry for a given element type, falling back to the
|
|
@@ -32339,9 +33501,9 @@ class MscoaChartComponent {
|
|
|
32339
33501
|
}
|
|
32340
33502
|
}
|
|
32341
33503
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MscoaChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32342
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: MscoaChartComponent, isStandalone: true, selector: "lib-mscoa-chart", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, editorMode: { classPropertyName: "editorMode", publicName: "editorMode", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null }, formBuilderFunctions: { classPropertyName: "formBuilderFunctions", publicName: "formBuilderFunctions", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onContainerClick: "onContainerClick", interaction: "interaction" }, ngImport: i0, template: "@if ((viewData$ | async); as viewData) {\r\n<section\r\n (click)=\"setAsTouched($event)\"\r\n class=\"mscoa-chart__container\"\r\n [class.mscoa-chart__container--touched]=\"touched()\"\r\n role=\"region\"\r\n [attr.aria-label]=\"'MSCOA Account Chart'\"\r\n [attr.aria-busy]=\"viewData.loading || viewData.validatingValue\">\r\n\r\n @if (viewData.loading) {\r\n <div class=\"mscoa-chart__loading-container\" role=\"status\" aria-live=\"polite\">\r\n <mat-spinner [diameter]=\"40\"></mat-spinner>\r\n <span class=\"sr-only\">Loading account chart data...</span>\r\n </div>\r\n } @else {\r\n @defer () {\r\n @if (viewData.accountTreeKeys || viewData.cashAccountTreeKeys) {\r\n <div class=\"mscoa-chart__table-container\">\r\n @if (isDualAccountBasis) {\r\n <div class=\"dual-basis-container\" role=\"group\" aria-label=\"Dual accounting basis tables\">\r\n <div class=\"dual-basis-container__item\">\r\n <ng-container\r\n *ngTemplateOutlet=\"selectionTable;\r\n context: {\r\n accountingBasis: ACCOUNTING_BASIS.ACCRUAL,\r\n canCollapse: true,\r\n viewData: viewData\r\n }\">\r\n </ng-container>\r\n </div>\r\n\r\n <!-- Cash side suppressed while the configured dualCashExclusion\r\n conditions match the accrual selection: the user must not see\r\n (or be required to fill) the cash accounts. -->\r\n @if (!viewData.cashSuppressed) {\r\n <div class=\"dual-basis-container__item\">\r\n <ng-container\r\n *ngTemplateOutlet=\"selectionTable;\r\n context: {\r\n accountingBasis: ACCOUNTING_BASIS.CASH,\r\n canCollapse: true,\r\n viewData: viewData\r\n }\">\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"selectionTable;\r\n context: {\r\n accountingBasis: config()?.accountingBasis,\r\n canCollapse: false,\r\n viewData: viewData\r\n }\">\r\n </ng-container>\r\n }\r\n </div>\r\n }\r\n\r\n <ng-template\r\n #selectionTable\r\n let-accountingBasis=\"accountingBasis\"\r\n let-canCollapse=\"canCollapse\"\r\n let-viewData=\"viewData\">\r\n\r\n <div class=\"mscoa-chart-table\" role=\"group\" [attr.aria-label]=\"'Accounting basis: ' + (accountingBasis || 'Accrual')\">\r\n <!-- Toolbar -->\r\n <lib-mscoa-chart-toolbar\r\n [accountingBasis]=\"accountingBasis\"\r\n [canCollapse]=\"canCollapse\"\r\n [isExpanded]=\"getExpansionState(accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\"\r\n (toggleExpansion)=\"toggleDualBasisExpansion(accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\">\r\n </lib-mscoa-chart-toolbar>\r\n\r\n @if (shouldShowTable(isDualAccountBasis, getExpansionState(accountingBasis || ACCOUNTING_BASIS.ACCRUAL), accountingBasis)) {\r\n <div class=\"account-selection-table-wrapper\">\r\n <div\r\n class=\"account-selection-table-container\"\r\n [class.account-selection-table-container--accrual]=\"!accountingBasis || accountingBasis === ACCOUNTING_BASIS.ACCRUAL\"\r\n [class.account-selection-table-container--cash]=\"accountingBasis === ACCOUNTING_BASIS.CASH\"\r\n role=\"table\"\r\n [attr.aria-label]=\"'Account selection table for ' + (accountingBasis || 'Accrual') + ' basis'\">\r\n\r\n <table\r\n mat-table\r\n [dataSource]=\"accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashTableData : viewData.tableData\"\r\n [trackBy]=\"trackByRow\"\r\n class=\"table\"\r\n [attr.aria-label]=\"'Account selection table for ' + (accountingBasis || 'Accrual') + ' basis'\"\r\n [attr.aria-describedby]=\"'table-description-' + (accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\"\r\n role=\"table\">\r\n <span [id]=\"'table-description-' + (accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\" class=\"sr-only\">\r\n Use arrow keys to navigate between cells. Press Enter or Space to select an account.\r\n </span>\r\n\r\n @for (\r\n col of (accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols);\r\n track trackByColumn($index, col);\r\n let i = $index\r\n ) {\r\n <ng-container [matColumnDef]=\"col\" [sticky]=\"i === 0\">\r\n <!-- Header Cell -->\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n [class.table__header-cell--segment]=\"isSegmentColumn(i)\"\r\n [class.table__header-cell--regular]=\"!isSegmentColumn(i)\"\r\n [style.width.%]=\"getColumnWidthPercent(isSegmentColumn(i), (accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols).length)\"\r\n [style.min-width.px]=\"isSegmentColumn(i) ? 150 : 200\"\r\n [attr.aria-sort]=\"i === 0 ? 'none' : null\"\r\n [attr.scope]=\"'col'\"\r\n [attr.aria-label]=\"getHeaderText(col, i, accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashHasMultiSelect : viewData.hasMultiSelect) + ' column'\">\r\n {{ getHeaderText(col, i, accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashHasMultiSelect : viewData.hasMultiSelect) | titlecase | unCamelCase }}\r\n </th>\r\n\r\n <!-- Data Cell -->\r\n <td\r\n mat-cell\r\n *matCellDef=\"let row\"\r\n [class.table__cell--segment]=\"isSegmentColumn(i)\"\r\n [class.table__cell--regular]=\"!isSegmentColumn(i)\"\r\n [class.table__cell--active]=\"editSelection?.segment === row['segment'] && activeColumn === col\"\r\n [class.table__cell--business-error]=\"!isSegmentColumn(i) && getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [attr.aria-label]=\"'Cell for ' + row['segment'] + ' segment, ' + col + ' column'\"\r\n [attr.aria-selected]=\"!!row[col]\"\r\n [attr.aria-invalid]=\"!isSegmentColumn(i) && !!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [attr.role]=\"'gridcell'\"\r\n [attr.tabindex]=\"isSegmentColumn(i) ? -1 : (row[col] ? 0 : -1)\">\r\n\r\n @if (isSegmentColumn(i)) {\r\n <!-- Segment Column -->\r\n <div class=\"segment-cell-content\">\r\n @if (editorMode() && row.innerInput?.id) {\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerData]=\"{innerInput: row.innerInput}\"\r\n [matMenuTriggerFor]=\"inputMenu\"\r\n [matTooltip]=\"'Options for: ' + row.innerInput.label\"\r\n [attr.aria-label]=\"'Options menu for ' + row.innerInput.label\"\r\n (click)=\"$event.stopPropagation()\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n }\r\n <span class=\"segment-cell-content__label\">{{ row['label'] }}</span>\r\n </div>\r\n } @else {\r\n <!-- Regular Column -->\r\n @if (row.innerInput?.id) {\r\n <!-- Custom-input row (peer of the segments): the value is entered inline via the\r\n input portal on the primary (debit) leg; other legs mirror it and render no\r\n control. `innerInput.id` is already the namespaced portal key, so it is looked\r\n up directly \u2014 prepending it again (getPortalKey) double-namespaces and misses. -->\r\n @if (col === COLUMNS.DEBIT && formGroup() && inputPortals[row.innerInput.id]) {\r\n <div class=\"portal-container\">\r\n <ng-template [cdkPortalOutlet]=\"inputPortals[row.innerInput.id]\"></ng-template>\r\n </div>\r\n }\r\n } @else {\r\n @if (row[col]) {\r\n <!-- Account Selected -->\r\n @if (getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row); as cellError) {\r\n <div class=\"account-cell-wrapper\"\r\n [class.account-cell-wrapper--expandable]=\"isTextTruncated(row[col] | unCamelCase)\">\r\n <button\r\n [disabled]=\"row['singleSelect'] === true && col === COLUMNS.CREDIT\"\r\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation(); selectAccount(row, col, accountingBasis === ACCOUNTING_BASIS.CASH); setAsTouched($event)\"\r\n (keydown)=\"handleCellKeyDown($event, row, col, accountingBasis === ACCOUNTING_BASIS.CASH)\"\r\n color=\"primary\"\r\n mat-button\r\n class=\"cell-button cell-button--selected cell-button--business-error\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase) + ' for ' + row['segment'] + ' segment, ' + col + ' column. Business error: ' + cellError.message\"\r\n [attr.aria-invalid]=\"true\"\r\n [attr.aria-pressed]=\"true\"\r\n [matTooltip]=\"cellError.message\">\r\n <div class=\"content\">\r\n <span\r\n class=\"selected-acount-label selected-acount-label--tag selected-acount-label--business-error\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase)\">\r\n {{ row[col] | unCamelCase }}\r\n @if (shouldShowVatChip(row, col)) {\r\n <span\r\n class=\"vat-badge\"\r\n [attr.aria-label]=\"'VAT applicable to ' + col + ' column'\"\r\n [matTooltip]=\"'VAT is applicable to this ' + col + ' account selection'\">\r\n VAT\r\n </span>\r\n }\r\n </span>\r\n <mat-icon class=\"business-error-indicator\" aria-hidden=\"true\">error</mat-icon>\r\n </div>\r\n </button>\r\n </div>\r\n } @else {\r\n <div class=\"account-cell-wrapper\"\r\n [class.account-cell-wrapper--expandable]=\"isTextTruncated(row[col] | unCamelCase)\">\r\n <button\r\n [disabled]=\"(row['singleSelect'] === true && col === COLUMNS.CREDIT) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation(); selectAccount(row, col, accountingBasis === ACCOUNTING_BASIS.CASH); setAsTouched($event)\"\r\n (keydown)=\"handleCellKeyDown($event, row, col, accountingBasis === ACCOUNTING_BASIS.CASH)\"\r\n color=\"primary\"\r\n mat-button\r\n class=\"cell-button cell-button--selected\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase) + ' for ' + row['segment'] + ' segment, ' + col + ' column. Press Enter or Space to change'\"\r\n [attr.aria-invalid]=\"false\"\r\n [attr.aria-disabled]=\"(row['singleSelect'] === true && col === COLUMNS.CREDIT) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [attr.aria-pressed]=\"true\">\r\n <div class=\"content\">\r\n <span\r\n class=\"selected-acount-label selected-acount-label--tag\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase)\">\r\n {{ row[col] | unCamelCase }}\r\n @if (shouldShowVatChip(row, col)) {\r\n <span\r\n class=\"vat-badge\"\r\n [attr.aria-label]=\"'VAT applicable to ' + col + ' column'\"\r\n [matTooltip]=\"'VAT is applicable to this ' + col + ' account selection'\">\r\n VAT\r\n </span>\r\n }\r\n </span>\r\n @if (showValidationSuccessIndicators) {\r\n <mat-icon class=\"validated-indicator\" aria-hidden=\"true\" [matTooltip]=\"'Validated'\">shield</mat-icon>\r\n } @else {\r\n <mat-icon class=\"success-indicator\" aria-hidden=\"true\">check_circle</mat-icon>\r\n }\r\n </div>\r\n </button>\r\n </div>\r\n }\r\n } @else {\r\n <!-- No Account Selected -->\r\n <div class=\"cell-button-wrapper\">\r\n <button\r\n [disabled]=\"selectionDisabled(row, col) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [color]=\"\"\r\n (click)=\"selectAccount(row, col, accountingBasis === ACCOUNTING_BASIS.CASH); $event.stopPropagation(); setAsTouched($event)\"\r\n (keydown)=\"handleCellKeyDown($event, row, col, accountingBasis === ACCOUNTING_BASIS.CASH)\"\r\n mat-button\r\n class=\"cell-button\"\r\n [class.cell-button--business-error]=\"!!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [attr.aria-label]=\"shouldShowAutoSelectedLabel(row, col) ? 'Auto selected for ' + row['segment'] + ' segment, ' + col + ' column' : 'Select account for ' + row['segment'] + ' segment, ' + col + ' column'\"\r\n [attr.aria-disabled]=\"selectionDisabled(row, col) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [attr.aria-describedby]=\"getValidationHint(row, col, accountingBasis || ACCOUNTING_BASIS.ACCRUAL) ? 'hint-' + row['segment'] + '-' + col : null\"\r\n [attr.aria-invalid]=\"hasError(touched(), inputConfig().required || false, !!row[col]) || !!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [attr.aria-required]=\"inputConfig().required && !row[col]\"\r\n [matTooltip]=\"getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)?.message\">\r\n <div class=\"content\">\r\n <span\r\n class=\"selected-acount-label\"\r\n [class.selected-acount-label--error]=\"hasError(touched(), inputConfig().required || false, !!row[col])\"\r\n [class.selected-acount-label--business-error]=\"!!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\">\r\n {{ (shouldShowAutoSelectedLabel(row, col) ? 'auto selected' : 'Select account') | unCamelCase }}\r\n @if (inputConfig().required && !row[col]) {\r\n <span class=\"required-indicator\" aria-label=\"Required field\">*</span>\r\n }\r\n </span>\r\n @if (getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)) {\r\n <mat-icon class=\"business-error-indicator\" aria-hidden=\"true\">error</mat-icon>\r\n } @else if (shouldShowDropdownIcon(row, col)) {\r\n <mat-icon aria-hidden=\"true\">arrow_drop_down</mat-icon>\r\n }\r\n </div>\r\n </button>\r\n @if (getValidationHint(row, col, accountingBasis || ACCOUNTING_BASIS.ACCRUAL); as hint) {\r\n <span\r\n class=\"inline-hint\"\r\n [id]=\"'hint-' + row['segment'] + '-' + col\"\r\n role=\"tooltip\"\r\n aria-live=\"polite\">\r\n {{ hint }}\r\n </span>\r\n }\r\n </div>\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: (accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols)\"></tr>\r\n </table>\r\n </div>\r\n </div>\r\n\r\n <!-- Empty State -->\r\n @if ((accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashAccountTreeKeys : viewData.accountTreeKeys).length === 0) {\r\n <section class=\"empty-state\" role=\"status\" aria-live=\"polite\">\r\n <mat-icon aria-hidden=\"true\">info</mat-icon>\r\n <span>\r\n No account segments are currently configured.\r\n Please configure account segments to proceed.\r\n </span>\r\n </section>\r\n }\r\n\r\n <!-- Success Messages (Temporary) -->\r\n @if ((successMessage$ | async); as successMessages) {\r\n @if (getSuccessMessage(successMessages, accountingBasis || ACCOUNTING_BASIS.ACCRUAL); as msg) {\r\n <lib-mscoa-temporary-hint\r\n [message]=\"getSuccessMessage(successMessages, accountingBasis || ACCOUNTING_BASIS.ACCRUAL) ?? ''\"\r\n [type]=\"'info'\"\r\n [duration]=\"6000\"\r\n [showDismiss]=\"true\">\r\n </lib-mscoa-temporary-hint>\r\n }\r\n }\r\n\r\n <!-- Business Rule Errors (Temporary display, keeps error styling) -->\r\n @if ((viewData.busnessRuleErrors[accountingBasis || ACCOUNTING_BASIS.ACCRUAL] || []).length > 0) {\r\n <lib-mscoa-error-display\r\n [errors]=\"viewData.busnessRuleErrors[accountingBasis || ACCOUNTING_BASIS.ACCRUAL] || []\"\r\n type=\"error\"\r\n [context]=\"{ accountingBasis: accountingBasis || ACCOUNTING_BASIS.ACCRUAL }\"\r\n [duration]=\"6000\"\r\n [showDismiss]=\"true\">\r\n </lib-mscoa-error-display>\r\n }\r\n\r\n <!-- Temporary Contextual Hints -->\r\n @if (temporaryHintMessage) {\r\n <lib-mscoa-temporary-hint\r\n [message]=\"temporaryHintMessage\"\r\n [type]=\"temporaryHintType\"\r\n [duration]=\"6000\"\r\n [showDismiss]=\"true\">\r\n </lib-mscoa-temporary-hint>\r\n }\r\n\r\n <!-- Validation Hints (Context-Aware) -->\r\n @if (!touched() && inputConfig().required && !viewData.busnessRuleErrors[accountingBasis || ACCOUNTING_BASIS.ACCRUAL]?.length && (!isDualAccountBasis || accountingBasis === ACCOUNTING_BASIS.ACCRUAL || !accountingBasis)) {\r\n <div class=\"validation-hints\" role=\"region\" aria-label=\"Validation guidance\">\r\n <p class=\"validation-hints__title\">Guidance:</p>\r\n <ul class=\"validation-hints__list\">\r\n <li>Account combinations are validated automatically. Select accounts that belong to compatible reporting categories.</li>\r\n <li>Required fields are marked with an asterisk (*). Complete all required selections to proceed.</li>\r\n <li>Some fields may be automatically populated based on your selections to ensure consistency.</li>\r\n </ul>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n } @placeholder {\r\n <div class=\"loading-placeholder\" role=\"status\" aria-live=\"polite\">\r\n <p>Loading data...</p>\r\n </div>\r\n } @loading (minimum 100ms) {\r\n <div class=\"loading-spinner-container\" role=\"status\" aria-live=\"polite\">\r\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"40\"></mat-progress-spinner>\r\n <span class=\"sr-only\">Loading account chart...</span>\r\n </div>\r\n } @error {\r\n <div class=\"error-state\" role=\"alert\" aria-live=\"assertive\">\r\n <p>Error loading data. Please try again.</p>\r\n </div>\r\n }\r\n }\r\n</section>\r\n}\r\n\r\n<!-- Input Menu -->\r\n<mat-menu #inputMenu=\"matMenu\">\r\n <ng-template matMenuContent let-innerInput=\"innerInput\">\r\n <lib-mscoa-chart-input-menu\r\n [innerInput]=\"innerInput\"\r\n [countdownSeconds]=\"inputWillBeRemovedIn(innerInput.id)\"\r\n [hoveredId]=\"hoveredInputId\"\r\n (edit)=\"onInputMenuEdit($event)\"\r\n (delete)=\"onInputMenuDelete($event)\"\r\n (cancelDelete)=\"onInputMenuCancelDelete($event)\"\r\n (hoverStart)=\"onInputMenuHoverStart($event)\"\r\n (hoverEnd)=\"onInputMenuHoverEnd()\">\r\n </lib-mscoa-chart-input-menu>\r\n </ng-template>\r\n</mat-menu>\r\n", styles: ["@charset \"UTF-8\";:host{--mscoa-chart-spacing-xs: 4px;--mscoa-chart-spacing-sm: 8px;--mscoa-chart-spacing-md: 16px;--mscoa-chart-spacing-lg: 24px;--mscoa-chart-spacing-xl: 32px;--mscoa-chart-border-radius: 4px;--mscoa-chart-transition: var(--lib-forms-duration-hover) var(--lib-forms-easing);--mscoa-chart-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;--mscoa-chart-font-size-base: 14px;--mscoa-chart-line-height: 1.5;display:block;font-family:var(--mscoa-chart-font-family);font-size:var(--mscoa-chart-font-size-base);line-height:var(--mscoa-chart-line-height)}.mscoa-chart__container{padding:0;transition:background-color var(--mscoa-chart-transition);width:100%;max-width:100%;overflow-x:hidden;box-sizing:border-box}.mscoa-chart__loading-container{padding:var(--mscoa-chart-spacing-lg);display:flex;align-items:center;justify-content:center}.mscoa-chart__table-container{position:relative;width:100%;max-width:100%;overflow-x:auto;overflow-y:visible;box-sizing:border-box}.dual-basis-container{display:flex;flex-direction:column;gap:var(--mscoa-chart-spacing-sm)}.dual-basis-container__item{flex:1}:host .single-base{gap:var(--mscoa-chart-spacing-sm);height:48px;font-size:.875em;font-weight:500;transition:background-color var(--mscoa-chart-transition)}:host .single-base--cash{background:var(--mat-sys-inverse-primary)}.account-selection-table-wrapper{position:relative;width:100%}.account-selection-table-container{border-radius:var(--mscoa-chart-border-radius);overflow-x:auto;overflow-y:visible;transition:border-color var(--mscoa-chart-transition);width:100%;max-width:100%;box-sizing:border-box;display:block}.account-selection-table-container--accrual{border:solid 1px var(--mat-sys-primary)}.account-selection-table-container--cash{border:solid 1px var(--mat-sys-inverse-primary)}.account-selection-table-container::-webkit-scrollbar{height:8px}.account-selection-table-container::-webkit-scrollbar-track{background:var(--lib-forms-surface-container-low);border-radius:4px}.account-selection-table-container::-webkit-scrollbar-thumb{background:var(--lib-forms-outline-variant);border-radius:4px}.account-selection-table-container::-webkit-scrollbar-thumb:hover{background:var(--lib-forms-outline)}.table{width:100%;table-layout:fixed;font-family:var(--mscoa-chart-font-family);font-size:var(--mscoa-chart-font-size-base);line-height:var(--mscoa-chart-line-height);border-collapse:separate;border-spacing:0;display:table;box-sizing:border-box;max-width:100%}.table__header-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.table__header-cell--segment{text-align:right;padding-right:var(--mscoa-chart-spacing-md);min-width:150px;max-width:200px}.table__header-cell--regular{padding-left:var(--mscoa-chart-spacing-lg);min-width:200px;max-width:none}.table__cell{overflow:visible;box-sizing:border-box;position:relative;vertical-align:top}.table__cell--segment{background:var(--mat-list-active-indicator-color, var(--mat-sys-secondary-container));text-align:right;font-weight:500;padding-right:var(--mscoa-chart-spacing-md);min-width:150px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;vertical-align:middle}.table__cell--regular{padding:0;min-width:200px;max-width:none;word-wrap:break-word;vertical-align:top;overflow:visible}.table__cell--active{background-color:var(--mat-sys-primary-container);transition:background-color var(--mscoa-chart-transition)}mat-header-cell{background:var(--mat-sys-surface-container);font-weight:600;font-size:var(--mscoa-chart-font-size-base);padding:var(--mscoa-chart-spacing-md)}.mscoa-chart-table{display:flex;flex-direction:column}.portal-container{width:100%}.account-cell-wrapper{position:relative;width:100%;max-width:100%;overflow:visible;z-index:1;min-height:38px;display:flex;flex-direction:column;gap:4px}.cell-button-wrapper{position:relative;width:100%;max-width:100%;overflow:hidden}.cell-button{height:fit-content;min-height:38px;width:100%;max-width:100%;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),transform var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing);font-family:var(--mscoa-chart-font-family);font-size:var(--mscoa-chart-font-size-base);line-height:var(--mscoa-chart-line-height);position:relative;overflow:visible;padding:8px}.cell-button:hover:not(:disabled){background-color:var(--mat-sys-surface-container);transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.cell-button:focus-visible{outline:3px solid var(--mat-sys-primary);outline-offset:2px;z-index:1}.cell-button:disabled{opacity:.6;cursor:not-allowed}.cell-button--selected{background-color:transparent}.cell-button--selected:hover:not(:disabled){background-color:var(--lib-forms-surface-container-low);border-color:var(--lib-forms-primary)}.cell-button.cell-button--selected{animation:fadeInSuccess var(--mscoa-chart-transition)}.cell-button.cell-button--business-error{border-color:var(--lib-forms-error)}.cell-button.cell-button--business-error .selected-acount-label--business-error{color:var(--mat-sys-error);border-color:var(--mat-sys-error)}.success-indicator{color:var(--sem-success);font-size:18px;width:18px;right:-8px;top:-4px;background:var(--lib-forms-surface);border-radius:16px;position:absolute;height:18px;margin-left:var(--mscoa-chart-spacing-xs);animation:scaleIn var(--mscoa-chart-transition);flex-shrink:0}.validated-indicator{color:var(--lib-forms-primary);font-size:18px;width:18px;height:18px;right:-8px;top:-4px;background:var(--lib-forms-surface);border-radius:16px;position:absolute;margin-left:var(--mscoa-chart-spacing-xs);flex-shrink:0;animation:validatedShieldIn .3s ease-out forwards}.business-error-indicator{color:var(--lib-forms-error);font-size:18px;width:18px;right:-8px;top:-4px;background:var(--lib-forms-surface);border-radius:16px;position:absolute;height:18px;margin-left:var(--mscoa-chart-spacing-xs);flex-shrink:0}.required-indicator{color:var(--lib-forms-error);font-weight:600;margin-left:2px}.inline-hint{display:block;font-size:12px;color:var(--lib-forms-on-surface-variant);margin-top:var(--mscoa-chart-spacing-xs);padding:var(--mscoa-chart-spacing-xs) var(--mscoa-chart-spacing-sm);background-color:var(--lib-forms-surface-container-low);border-radius:var(--mscoa-chart-border-radius);line-height:1.4;max-width:100%;word-wrap:break-word}.content{padding:0;display:flex;gap:6px;width:100%;max-width:100%;overflow:visible;min-width:0;flex-wrap:wrap;align-items:center}.selected-acount-label{text-align:left;flex:1;font-weight:400;transition:color var(--mscoa-chart-transition)}.selected-acount-label--error,.selected-acount-label--business-error{color:var(--mat-sys-error);font-weight:500}.selected-acount-label--tag{display:inline-block;padding:4px 10px;background-color:var(--lib-forms-primary-container);color:var(--lib-forms-on-primary-container);border-radius:16px;font-size:13px;font-weight:500;line-height:1.5;border:1px solid var(--lib-forms-primary);box-shadow:0 1px 2px #0000001a;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing);width:100%;max-width:100%;overflow:visible;white-space:normal;word-wrap:break-word;word-break:break-word;cursor:pointer;box-sizing:border-box;position:relative}.selected-acount-label--tag:hover{background-color:var(--sem-info-surface);box-shadow:0 2px 4px #1976d226}.segment-cell-content{display:flex;align-items:center;justify-content:flex-end;font-weight:500}.vat-badge{display:inline-flex;align-items:center;justify-content:center;height:16px;padding:2px 6px;border-radius:8px;font-size:9px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;background-color:var(--sem-success-surface);color:var(--sem-warning);border:1px solid var(--lib-forms-outline-variant);box-shadow:none;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),border-color var(--lib-forms-duration-hover) var(--lib-forms-easing);flex-shrink:0;align-self:flex-start;margin-top:2px;line-height:1}.vat-badge:hover{background-color:var(--sem-warning-surface);border-color:var(--sem-warning)}.vat-chip-container{padding-left:var(--mscoa-chart-spacing-sm);padding-right:var(--mscoa-chart-spacing-sm);padding-bottom:var(--mscoa-chart-spacing-xs);margin-top:var(--mscoa-chart-spacing-xs)}.vat-chip{display:inline-flex;align-items:center;gap:4px;height:24px;padding:4px 8px;border-radius:12px;font-size:11px;font-weight:600;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing),transform var(--lib-forms-duration-hover) var(--lib-forms-easing);box-shadow:0 1px 3px #0000001f}.vat-chip--applicable{background:linear-gradient(135deg,var(--sem-warning) 0%,var(--sem-warning) 100%);color:var(--lib-forms-on-primary);border:1px solid var(--sem-warning)}.vat-chip--applicable:hover{box-shadow:0 2px 6px #f57c004d;transform:translateY(-1px)}.vat-chip__icon{font-size:14px;width:14px;height:14px;opacity:.9}.vat-chip__text{font-size:11px;font-weight:600;letter-spacing:.3px}.info-box{display:flex;align-items:center;gap:var(--mscoa-chart-spacing-sm);padding:12px;background:var(--sem-info-surface);border-radius:var(--mscoa-chart-border-radius);margin-bottom:var(--mscoa-chart-spacing-md)}.info-icon{min-width:38px;margin:auto;margin-top:var(--mscoa-chart-spacing-sm)}.empty-state{padding:var(--mscoa-chart-spacing-md);text-align:center;display:flex;align-items:center;justify-content:center;gap:var(--mscoa-chart-spacing-sm);color:var(--mat-sys-on-surface-variant)}.validation-hints{margin-top:var(--mscoa-chart-spacing-md);padding:var(--mscoa-chart-spacing-md);background-color:var(--lib-forms-surface-container-low);border-radius:var(--mscoa-chart-border-radius);border-left:4px solid var(--lib-forms-primary);box-shadow:0 1px 3px #00000014}.validation-hints__title{font-weight:600;font-size:var(--mscoa-chart-font-size-base);margin:0 0 var(--mscoa-chart-spacing-sm) 0;color:var(--lib-forms-on-surface);display:flex;align-items:center;gap:var(--mscoa-chart-spacing-xs)}.validation-hints__title:before{content:\"\\1f4a1\";font-size:16px}.validation-hints__list{margin:0;padding-left:var(--mscoa-chart-spacing-md);color:var(--lib-forms-on-surface-variant);font-size:13px;line-height:1.6}.validation-hints__list li{margin-bottom:var(--mscoa-chart-spacing-sm);position:relative}.validation-hints__list li::marker{color:var(--lib-forms-primary)}.validation-hints__list li:last-child{margin-bottom:0}mat-error{font-size:.75em;margin-top:var(--mscoa-chart-spacing-xs)}mat-error ul{margin:0;padding-left:var(--mscoa-chart-spacing-md)}mat-error li{margin-bottom:var(--mscoa-chart-spacing-xs)}.loading-placeholder{padding:var(--mscoa-chart-spacing-md);color:var(--mat-sys-on-surface-variant)}.loading-spinner-container{display:flex;justify-content:center;align-items:center;height:256px}.error-state{padding:var(--mscoa-chart-spacing-md);color:var(--mat-sys-error)}mat-panel-description{font-size:.875em;line-height:1.4}:host .main-expanse-content{background:var(--mat-sys-surface-container)}@media(max-width:768px){.dual-basis-container{gap:var(--mscoa-chart-spacing-md)}.cell-button{min-height:44px;font-size:15px;max-width:300px}.content{padding:var(--mscoa-chart-spacing-md)}.validation-hints{font-size:13px;padding:var(--mscoa-chart-spacing-sm)}.inline-hint{font-size:11px}}.cell-button:focus-visible,button:focus-visible{outline:3px solid var(--mat-sys-primary);outline-offset:2px;outline-style:solid}@media(prefers-contrast:high){.cell-button{border:2px solid currentColor}.cell-button:focus-visible{outline-width:4px}.selected-acount-label--error{font-weight:600}}@media(prefers-reduced-motion:reduce){.cell-button,.success-indicator,.fade-in,.validated-indicator{animation:none;transition:none}}.table__cell--active{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}@media(prefers-contrast:high){.table__cell--active{background-color:var(--mat-sys-primary);color:var(--mat-sys-on-primary)}}.table__cell--business-error{background-color:var(--lib-forms-error-container);border-left:3px solid var(--lib-forms-error)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeInSuccess{0%{background-color:transparent}50%{background-color:var(--sem-success-surface)}to{background-color:var(--mat-sys-primary-container)}}@keyframes scaleIn{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes validatedShieldIn{0%{opacity:0;transform:scale(.6)}70%{opacity:1;transform:scale(1.1)}to{opacity:1;transform:scale(1)}}.fade-in{animation:fadeIn var(--mscoa-chart-transition)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.skeleton-loader{background:linear-gradient(90deg,var(--mat-sys-surface-container) 25%,var(--mat-sys-surface-container-high) 50%,var(--mat-sys-surface-container) 75%);background-size:200% 100%;animation:loading 1.5s ease-in-out infinite;border-radius:var(--mscoa-chart-border-radius)}@keyframes loading{0%{background-position:200% 0}to{background-position:-200% 0}}.skeleton-row{height:48px;margin-bottom:var(--mscoa-chart-spacing-xs)}.skeleton-cell{height:100%;margin-right:var(--mscoa-chart-spacing-md)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: PortalModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i6$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i6$1.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "ngmodule", type: MatTableModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MscoaChartInputMenuComponent, selector: "lib-mscoa-chart-input-menu", inputs: ["innerInput", "countdownSeconds", "hoveredId"], outputs: ["edit", "delete", "cancelDelete", "hoverStart", "hoverEnd"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i3.NgTemplateOutlet, i4$2.CdkPortalOutlet, i2.MatButton, i2.MatIconButton, i3$1.MatIcon, i6$1.MatMenuTrigger, i5$1.MatTable, i5$1.MatHeaderCellDef, i5$1.MatHeaderRowDef, i5$1.MatColumnDef, i5$1.MatCellDef, i5$1.MatRowDef, i5$1.MatHeaderCell, i5$1.MatCell, i5$1.MatHeaderRow, i5$1.MatRow, i5.MatTooltip, import('./ngx-t-forms-mscoa-chart-toolbar.component-Cj1zfMAW.mjs').then(m => m.MscoaChartToolbarComponent), import('./ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs').then(m => m.MscoaErrorDisplayComponent), import('./ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs').then(m => m.MscoaTemporaryHintComponent), i3.AsyncPipe, i3.TitleCasePipe, Promise.resolve().then(function () { return daysAgo_pipe; }).then(m => m.ConvertCamelCasePipe)]] }); }
|
|
33504
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: MscoaChartComponent, isStandalone: true, selector: "lib-mscoa-chart", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, editorMode: { classPropertyName: "editorMode", publicName: "editorMode", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null }, formBuilderFunctions: { classPropertyName: "formBuilderFunctions", publicName: "formBuilderFunctions", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onContainerClick: "onContainerClick", interaction: "interaction" }, ngImport: i0, template: "@if ((viewData$ | async); as viewData) {\r\n<section\r\n (click)=\"setAsTouched($event)\"\r\n class=\"mscoa-chart__container\"\r\n [class.mscoa-chart__container--touched]=\"touched()\"\r\n role=\"region\"\r\n [attr.aria-label]=\"'MSCOA Account Chart'\"\r\n [attr.aria-busy]=\"viewData.loading || viewData.validatingValue\">\r\n\r\n @if (viewData.loading) {\r\n <div class=\"mscoa-chart__loading-container\" role=\"status\" aria-live=\"polite\">\r\n <mat-spinner [diameter]=\"40\"></mat-spinner>\r\n <span class=\"sr-only\">Loading account chart data...</span>\r\n </div>\r\n } @else {\r\n @defer () {\r\n @if (viewData.accountTreeKeys || viewData.cashAccountTreeKeys) {\r\n <div class=\"mscoa-chart__table-container\">\r\n @if (isDualAccountBasis) {\r\n <div class=\"dual-basis-container\" role=\"group\" aria-label=\"Dual accounting basis tables\">\r\n <div class=\"dual-basis-container__item\">\r\n <ng-container\r\n *ngTemplateOutlet=\"selectionTable;\r\n context: {\r\n accountingBasis: ACCOUNTING_BASIS.ACCRUAL,\r\n canCollapse: true,\r\n viewData: viewData\r\n }\">\r\n </ng-container>\r\n </div>\r\n\r\n <!-- Cash side suppressed while the configured dualCashExclusion\r\n conditions match the accrual selection: the user must not see\r\n (or be required to fill) the cash accounts. -->\r\n @if (!viewData.cashSuppressed) {\r\n <div class=\"dual-basis-container__item\">\r\n <ng-container\r\n *ngTemplateOutlet=\"selectionTable;\r\n context: {\r\n accountingBasis: ACCOUNTING_BASIS.CASH,\r\n canCollapse: true,\r\n viewData: viewData\r\n }\">\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"selectionTable;\r\n context: {\r\n accountingBasis: config()?.accountingBasis,\r\n canCollapse: false,\r\n viewData: viewData\r\n }\">\r\n </ng-container>\r\n }\r\n </div>\r\n }\r\n\r\n <ng-template\r\n #selectionTable\r\n let-accountingBasis=\"accountingBasis\"\r\n let-canCollapse=\"canCollapse\"\r\n let-viewData=\"viewData\">\r\n\r\n <div class=\"mscoa-chart-table\" role=\"group\" [attr.aria-label]=\"'Accounting basis: ' + (accountingBasis || 'Accrual')\">\r\n <!-- Toolbar -->\r\n <lib-mscoa-chart-toolbar\r\n [accountingBasis]=\"accountingBasis\"\r\n [canCollapse]=\"canCollapse\"\r\n [isExpanded]=\"getExpansionState(accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\"\r\n (toggleExpansion)=\"toggleDualBasisExpansion(accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\">\r\n </lib-mscoa-chart-toolbar>\r\n\r\n @if (shouldShowTable(isDualAccountBasis, getExpansionState(accountingBasis || ACCOUNTING_BASIS.ACCRUAL), accountingBasis)) {\r\n <div class=\"account-selection-table-wrapper\">\r\n <div\r\n class=\"account-selection-table-container\"\r\n [class.account-selection-table-container--accrual]=\"!accountingBasis || accountingBasis === ACCOUNTING_BASIS.ACCRUAL\"\r\n [class.account-selection-table-container--cash]=\"accountingBasis === ACCOUNTING_BASIS.CASH\"\r\n role=\"table\"\r\n [attr.aria-label]=\"'Account selection table for ' + (accountingBasis || 'Accrual') + ' basis'\">\r\n\r\n <table\r\n mat-table\r\n [dataSource]=\"accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashTableData : viewData.tableData\"\r\n [trackBy]=\"trackByRow\"\r\n class=\"table\"\r\n [attr.aria-label]=\"'Account selection table for ' + (accountingBasis || 'Accrual') + ' basis'\"\r\n [attr.aria-describedby]=\"'table-description-' + (accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\"\r\n role=\"table\">\r\n <span [id]=\"'table-description-' + (accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\" class=\"sr-only\">\r\n Use arrow keys to navigate between cells. Press Enter or Space to select an account.\r\n </span>\r\n\r\n @for (\r\n col of (accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols);\r\n track trackByColumn($index, col);\r\n let i = $index\r\n ) {\r\n <ng-container [matColumnDef]=\"col\" [sticky]=\"i === 0\">\r\n <!-- Header Cell -->\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n [class.table__header-cell--segment]=\"isSegmentColumn(i)\"\r\n [class.table__header-cell--regular]=\"!isSegmentColumn(i)\"\r\n [style.width.%]=\"getColumnWidthPercent(isSegmentColumn(i), (accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols).length)\"\r\n [style.min-width.px]=\"isSegmentColumn(i) ? 150 : 200\"\r\n [attr.aria-sort]=\"i === 0 ? 'none' : null\"\r\n [attr.scope]=\"'col'\"\r\n [attr.aria-label]=\"getHeaderText(col, i, accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashHasMultiSelect : viewData.hasMultiSelect) + ' column'\">\r\n {{ getHeaderText(col, i, accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashHasMultiSelect : viewData.hasMultiSelect) | titlecase | unCamelCase }}\r\n </th>\r\n\r\n <!-- Data Cell -->\r\n <td\r\n mat-cell\r\n *matCellDef=\"let row\"\r\n [class.table__cell--segment]=\"isSegmentColumn(i)\"\r\n [class.table__cell--regular]=\"!isSegmentColumn(i)\"\r\n [class.table__cell--active]=\"editSelection?.segment === row['segment'] && activeColumn === col\"\r\n [class.table__cell--business-error]=\"!isSegmentColumn(i) && getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [attr.aria-label]=\"'Cell for ' + row['segment'] + ' segment, ' + col + ' column'\"\r\n [attr.aria-selected]=\"!!row[col]\"\r\n [attr.aria-invalid]=\"!isSegmentColumn(i) && !!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [attr.role]=\"'gridcell'\"\r\n [attr.tabindex]=\"isSegmentColumn(i) ? -1 : (row[col] ? 0 : -1)\">\r\n\r\n @if (isSegmentColumn(i)) {\r\n <!-- Segment Column -->\r\n <div class=\"segment-cell-content\">\r\n @if (editorMode() && row.innerInput?.id) {\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerData]=\"{innerInput: row.innerInput}\"\r\n [matMenuTriggerFor]=\"inputMenu\"\r\n [matTooltip]=\"'Options for: ' + row.innerInput.label\"\r\n [attr.aria-label]=\"'Options menu for ' + row.innerInput.label\"\r\n (click)=\"$event.stopPropagation()\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n }\r\n <span class=\"segment-cell-content__label\">{{ row['label'] }}</span>\r\n </div>\r\n } @else {\r\n <!-- Regular Column -->\r\n @if (row.innerInput?.id) {\r\n <!-- Custom-input row (peer of the segments): the value is entered inline via the\r\n input portal on the primary (debit) leg; other legs mirror it and render no\r\n control. `innerInput.id` is already the namespaced portal key, so it is looked\r\n up directly \u2014 prepending it again (getPortalKey) double-namespaces and misses. -->\r\n @if (col === COLUMNS.DEBIT && formGroup() && inputPortals[row.innerInput.id]) {\r\n <div class=\"portal-container\">\r\n <ng-template [cdkPortalOutlet]=\"inputPortals[row.innerInput.id]\"></ng-template>\r\n </div>\r\n }\r\n } @else {\r\n @if (row[col]) {\r\n <!-- Account Selected -->\r\n @if (getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row); as cellError) {\r\n <div class=\"account-cell-wrapper\"\r\n [class.account-cell-wrapper--expandable]=\"isTextTruncated(row[col] | unCamelCase)\">\r\n <button\r\n [disabled]=\"row['singleSelect'] === true && col === COLUMNS.CREDIT\"\r\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation(); selectAccount(row, col, accountingBasis === ACCOUNTING_BASIS.CASH); setAsTouched($event)\"\r\n (keydown)=\"handleCellKeyDown($event, row, col, accountingBasis === ACCOUNTING_BASIS.CASH)\"\r\n color=\"primary\"\r\n mat-button\r\n class=\"cell-button cell-button--selected cell-button--business-error\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase) + ' for ' + row['segment'] + ' segment, ' + col + ' column. Business error: ' + cellError.message\"\r\n [attr.aria-invalid]=\"true\"\r\n [attr.aria-pressed]=\"true\"\r\n [matTooltip]=\"cellError.message\">\r\n <div class=\"content\">\r\n <span\r\n class=\"selected-acount-label selected-acount-label--tag selected-acount-label--business-error\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase)\">\r\n {{ row[col] | unCamelCase }}\r\n @if (shouldShowVatChip(row, col)) {\r\n <span\r\n class=\"vat-badge\"\r\n [attr.aria-label]=\"'VAT applicable to ' + col + ' column'\"\r\n [matTooltip]=\"'VAT is applicable to this ' + col + ' account selection'\">\r\n VAT\r\n </span>\r\n }\r\n </span>\r\n <mat-icon class=\"business-error-indicator\" aria-hidden=\"true\">error</mat-icon>\r\n </div>\r\n </button>\r\n </div>\r\n } @else {\r\n <div class=\"account-cell-wrapper\"\r\n [class.account-cell-wrapper--expandable]=\"isTextTruncated(row[col] | unCamelCase)\">\r\n <button\r\n [disabled]=\"(row['singleSelect'] === true && col === COLUMNS.CREDIT) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation(); selectAccount(row, col, accountingBasis === ACCOUNTING_BASIS.CASH); setAsTouched($event)\"\r\n (keydown)=\"handleCellKeyDown($event, row, col, accountingBasis === ACCOUNTING_BASIS.CASH)\"\r\n color=\"primary\"\r\n mat-button\r\n class=\"cell-button cell-button--selected\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase) + ' for ' + row['segment'] + ' segment, ' + col + ' column. Press Enter or Space to change'\"\r\n [attr.aria-invalid]=\"false\"\r\n [attr.aria-disabled]=\"(row['singleSelect'] === true && col === COLUMNS.CREDIT) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [attr.aria-pressed]=\"true\">\r\n <div class=\"content\">\r\n <span\r\n class=\"selected-acount-label selected-acount-label--tag\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase)\">\r\n {{ row[col] | unCamelCase }}\r\n @if (shouldShowVatChip(row, col)) {\r\n <span\r\n class=\"vat-badge\"\r\n [attr.aria-label]=\"'VAT applicable to ' + col + ' column'\"\r\n [matTooltip]=\"'VAT is applicable to this ' + col + ' account selection'\">\r\n VAT\r\n </span>\r\n }\r\n </span>\r\n @if (showValidationSuccessIndicators) {\r\n <mat-icon class=\"validated-indicator\" aria-hidden=\"true\" [matTooltip]=\"'Validated'\">shield</mat-icon>\r\n } @else {\r\n <mat-icon class=\"success-indicator\" aria-hidden=\"true\">check_circle</mat-icon>\r\n }\r\n </div>\r\n </button>\r\n </div>\r\n }\r\n } @else {\r\n <!-- No Account Selected -->\r\n <div class=\"cell-button-wrapper\">\r\n <button\r\n [disabled]=\"selectionDisabled(row, col) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [color]=\"\"\r\n (click)=\"selectAccount(row, col, accountingBasis === ACCOUNTING_BASIS.CASH); $event.stopPropagation(); setAsTouched($event)\"\r\n (keydown)=\"handleCellKeyDown($event, row, col, accountingBasis === ACCOUNTING_BASIS.CASH)\"\r\n mat-button\r\n class=\"cell-button\"\r\n [class.cell-button--business-error]=\"!!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [attr.aria-label]=\"shouldShowAutoSelectedLabel(row, col) ? 'Auto selected for ' + row['segment'] + ' segment, ' + col + ' column' : 'Select account for ' + row['segment'] + ' segment, ' + col + ' column'\"\r\n [attr.aria-disabled]=\"selectionDisabled(row, col) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [attr.aria-describedby]=\"getValidationHint(row, col, accountingBasis || ACCOUNTING_BASIS.ACCRUAL) ? 'hint-' + row['segment'] + '-' + col : null\"\r\n [attr.aria-invalid]=\"hasError(touched(), inputConfig().required || false, !!row[col]) || !!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\"\r\n [attr.aria-required]=\"inputConfig().required && !row[col]\"\r\n [matTooltip]=\"getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)?.message\">\r\n <div class=\"content\">\r\n <span\r\n class=\"selected-acount-label\"\r\n [class.selected-acount-label--error]=\"hasError(touched(), inputConfig().required || false, !!row[col])\"\r\n [class.selected-acount-label--business-error]=\"!!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)\">\r\n {{ (shouldShowAutoSelectedLabel(row, col) ? 'auto selected' : 'Select account') | unCamelCase }}\r\n @if (inputConfig().required && !row[col]) {\r\n <span class=\"required-indicator\" aria-label=\"Required field\">*</span>\r\n }\r\n </span>\r\n @if (getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row)) {\r\n <mat-icon class=\"business-error-indicator\" aria-hidden=\"true\">error</mat-icon>\r\n } @else if (shouldShowDropdownIcon(row, col)) {\r\n <mat-icon aria-hidden=\"true\">arrow_drop_down</mat-icon>\r\n }\r\n </div>\r\n </button>\r\n @if (getValidationHint(row, col, accountingBasis || ACCOUNTING_BASIS.ACCRUAL); as hint) {\r\n <span\r\n class=\"inline-hint\"\r\n [id]=\"'hint-' + row['segment'] + '-' + col\"\r\n role=\"tooltip\"\r\n aria-live=\"polite\">\r\n {{ hint }}\r\n </span>\r\n }\r\n </div>\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: (accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols)\"></tr>\r\n </table>\r\n </div>\r\n </div>\r\n\r\n <!-- Empty State -->\r\n @if ((accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashAccountTreeKeys : viewData.accountTreeKeys).length === 0) {\r\n <section class=\"empty-state\" role=\"status\" aria-live=\"polite\">\r\n <mat-icon aria-hidden=\"true\">info</mat-icon>\r\n <span>\r\n No account segments are currently configured.\r\n Please configure account segments to proceed.\r\n </span>\r\n </section>\r\n }\r\n\r\n <!-- Success Messages (Temporary) -->\r\n @if ((successMessage$ | async); as successMessages) {\r\n @if (getSuccessMessage(successMessages, accountingBasis || ACCOUNTING_BASIS.ACCRUAL); as msg) {\r\n <lib-mscoa-temporary-hint\r\n [message]=\"getSuccessMessage(successMessages, accountingBasis || ACCOUNTING_BASIS.ACCRUAL) ?? ''\"\r\n [type]=\"'info'\"\r\n [duration]=\"6000\"\r\n [showDismiss]=\"true\">\r\n </lib-mscoa-temporary-hint>\r\n }\r\n }\r\n\r\n <!-- Business Rule Errors (Temporary display, keeps error styling) -->\r\n @if ((viewData.busnessRuleErrors[accountingBasis || ACCOUNTING_BASIS.ACCRUAL] || []).length > 0) {\r\n <lib-mscoa-error-display\r\n [errors]=\"viewData.busnessRuleErrors[accountingBasis || ACCOUNTING_BASIS.ACCRUAL] || []\"\r\n type=\"error\"\r\n [context]=\"{ accountingBasis: accountingBasis || ACCOUNTING_BASIS.ACCRUAL }\"\r\n [duration]=\"6000\"\r\n [showDismiss]=\"true\">\r\n </lib-mscoa-error-display>\r\n }\r\n\r\n <!-- Temporary Contextual Hints -->\r\n @if (temporaryHintMessage) {\r\n <lib-mscoa-temporary-hint\r\n [message]=\"temporaryHintMessage\"\r\n [type]=\"temporaryHintType\"\r\n [duration]=\"6000\"\r\n [showDismiss]=\"true\">\r\n </lib-mscoa-temporary-hint>\r\n }\r\n\r\n <!-- Validation Hints (Context-Aware) -->\r\n @if (!touched() && inputConfig().required && !viewData.busnessRuleErrors[accountingBasis || ACCOUNTING_BASIS.ACCRUAL]?.length && (!isDualAccountBasis || accountingBasis === ACCOUNTING_BASIS.ACCRUAL || !accountingBasis)) {\r\n <div class=\"validation-hints\" role=\"region\" aria-label=\"Validation guidance\">\r\n <p class=\"validation-hints__title\">Guidance:</p>\r\n <ul class=\"validation-hints__list\">\r\n <li>Account combinations are validated automatically. Select accounts that belong to compatible reporting categories.</li>\r\n <li>Required fields are marked with an asterisk (*). Complete all required selections to proceed.</li>\r\n <li>Some fields may be automatically populated based on your selections to ensure consistency.</li>\r\n </ul>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n } @placeholder {\r\n <div class=\"loading-placeholder\" role=\"status\" aria-live=\"polite\">\r\n <p>Loading data...</p>\r\n </div>\r\n } @loading (minimum 100ms) {\r\n <div class=\"loading-spinner-container\" role=\"status\" aria-live=\"polite\">\r\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"40\"></mat-progress-spinner>\r\n <span class=\"sr-only\">Loading account chart...</span>\r\n </div>\r\n } @error {\r\n <div class=\"error-state\" role=\"alert\" aria-live=\"assertive\">\r\n <p>Error loading data. Please try again.</p>\r\n </div>\r\n }\r\n }\r\n</section>\r\n}\r\n\r\n<!-- Input Menu -->\r\n<mat-menu #inputMenu=\"matMenu\">\r\n <ng-template matMenuContent let-innerInput=\"innerInput\">\r\n <lib-mscoa-chart-input-menu\r\n [innerInput]=\"innerInput\"\r\n [countdownSeconds]=\"inputWillBeRemovedIn(innerInput.id)\"\r\n [hoveredId]=\"hoveredInputId\"\r\n (edit)=\"onInputMenuEdit($event)\"\r\n (delete)=\"onInputMenuDelete($event)\"\r\n (cancelDelete)=\"onInputMenuCancelDelete($event)\"\r\n (hoverStart)=\"onInputMenuHoverStart($event)\"\r\n (hoverEnd)=\"onInputMenuHoverEnd()\">\r\n </lib-mscoa-chart-input-menu>\r\n </ng-template>\r\n</mat-menu>\r\n", styles: ["@charset \"UTF-8\";:host{--mscoa-chart-spacing-xs: 4px;--mscoa-chart-spacing-sm: 8px;--mscoa-chart-spacing-md: 16px;--mscoa-chart-spacing-lg: 24px;--mscoa-chart-spacing-xl: 32px;--mscoa-chart-border-radius: 4px;--mscoa-chart-transition: var(--lib-forms-duration-hover) var(--lib-forms-easing);--mscoa-chart-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;--mscoa-chart-font-size-base: 14px;--mscoa-chart-line-height: 1.5;display:block;font-family:var(--mscoa-chart-font-family);font-size:var(--mscoa-chart-font-size-base);line-height:var(--mscoa-chart-line-height)}.mscoa-chart__container{padding:0;transition:background-color var(--mscoa-chart-transition);width:100%;max-width:100%;overflow-x:hidden;box-sizing:border-box}.mscoa-chart__loading-container{padding:var(--mscoa-chart-spacing-lg);display:flex;align-items:center;justify-content:center}.mscoa-chart__table-container{position:relative;width:100%;max-width:100%;overflow-x:auto;overflow-y:visible;box-sizing:border-box}.dual-basis-container{display:flex;flex-direction:column;gap:var(--mscoa-chart-spacing-sm)}.dual-basis-container__item{flex:1}:host .single-base{gap:var(--mscoa-chart-spacing-sm);height:48px;font-size:.875em;font-weight:500;transition:background-color var(--mscoa-chart-transition)}:host .single-base--cash{background:var(--mat-sys-inverse-primary)}.account-selection-table-wrapper{position:relative;width:100%}.account-selection-table-container{border-radius:var(--mscoa-chart-border-radius);overflow-x:auto;overflow-y:visible;transition:border-color var(--mscoa-chart-transition);width:100%;max-width:100%;box-sizing:border-box;display:block}.account-selection-table-container--accrual{border:solid 1px var(--mat-sys-primary)}.account-selection-table-container--cash{border:solid 1px var(--mat-sys-inverse-primary)}.account-selection-table-container::-webkit-scrollbar{height:8px}.account-selection-table-container::-webkit-scrollbar-track{background:var(--lib-forms-surface-container-low);border-radius:4px}.account-selection-table-container::-webkit-scrollbar-thumb{background:var(--lib-forms-outline-variant);border-radius:4px}.account-selection-table-container::-webkit-scrollbar-thumb:hover{background:var(--lib-forms-outline)}.table{width:100%;table-layout:fixed;font-family:var(--mscoa-chart-font-family);font-size:var(--mscoa-chart-font-size-base);line-height:var(--mscoa-chart-line-height);border-collapse:separate;border-spacing:0;display:table;box-sizing:border-box;max-width:100%}.table__header-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.table__header-cell--segment{text-align:right;padding-right:var(--mscoa-chart-spacing-md);min-width:150px;max-width:200px}.table__header-cell--regular{padding-left:var(--mscoa-chart-spacing-lg);min-width:200px;max-width:none}.table__cell{overflow:visible;box-sizing:border-box;position:relative;vertical-align:top}.table__cell--segment{background:var(--mat-list-active-indicator-color, var(--mat-sys-secondary-container));text-align:right;font-weight:500;padding-right:var(--mscoa-chart-spacing-md);min-width:150px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;vertical-align:middle}.table__cell--regular{padding:0;min-width:200px;max-width:none;word-wrap:break-word;vertical-align:top;overflow:visible}.table__cell--active{background-color:var(--mat-sys-primary-container);transition:background-color var(--mscoa-chart-transition)}mat-header-cell{background:var(--mat-sys-surface-container);font-weight:600;font-size:var(--mscoa-chart-font-size-base);padding:var(--mscoa-chart-spacing-md)}.mscoa-chart-table{display:flex;flex-direction:column}.portal-container{width:100%}.account-cell-wrapper{position:relative;width:100%;max-width:100%;overflow:visible;z-index:1;min-height:38px;display:flex;flex-direction:column;gap:4px}.cell-button-wrapper{position:relative;width:100%;max-width:100%;overflow:hidden}.cell-button{height:fit-content;min-height:38px;width:100%;max-width:100%;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),transform var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing);font-family:var(--mscoa-chart-font-family);font-size:var(--mscoa-chart-font-size-base);line-height:var(--mscoa-chart-line-height);position:relative;overflow:visible;padding:8px}.cell-button:hover:not(:disabled){background-color:var(--mat-sys-surface-container);transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.cell-button:focus-visible{outline:3px solid var(--mat-sys-primary);outline-offset:2px;z-index:1}.cell-button:disabled{opacity:.6;cursor:not-allowed}.cell-button--selected{background-color:transparent}.cell-button--selected:hover:not(:disabled){background-color:var(--lib-forms-surface-container-low);border-color:var(--lib-forms-primary)}.cell-button.cell-button--selected{animation:fadeInSuccess var(--mscoa-chart-transition)}.cell-button.cell-button--business-error{border-color:var(--lib-forms-error)}.cell-button.cell-button--business-error .selected-acount-label--business-error{color:var(--mat-sys-error);border-color:var(--mat-sys-error)}.success-indicator{color:var(--sem-success);font-size:18px;width:18px;right:-8px;top:-4px;background:var(--lib-forms-surface);border-radius:16px;position:absolute;height:18px;margin-left:var(--mscoa-chart-spacing-xs);animation:scaleIn var(--mscoa-chart-transition);flex-shrink:0}.validated-indicator{color:var(--lib-forms-primary);font-size:18px;width:18px;height:18px;right:-8px;top:-4px;background:var(--lib-forms-surface);border-radius:16px;position:absolute;margin-left:var(--mscoa-chart-spacing-xs);flex-shrink:0;animation:validatedShieldIn .3s ease-out forwards}.business-error-indicator{color:var(--lib-forms-error);font-size:18px;width:18px;right:-8px;top:-4px;background:var(--lib-forms-surface);border-radius:16px;position:absolute;height:18px;margin-left:var(--mscoa-chart-spacing-xs);flex-shrink:0}.required-indicator{color:var(--lib-forms-error);font-weight:600;margin-left:2px}.inline-hint{display:block;font-size:12px;color:var(--lib-forms-on-surface-variant);margin-top:var(--mscoa-chart-spacing-xs);padding:var(--mscoa-chart-spacing-xs) var(--mscoa-chart-spacing-sm);background-color:var(--lib-forms-surface-container-low);border-radius:var(--mscoa-chart-border-radius);line-height:1.4;max-width:100%;word-wrap:break-word}.content{padding:0;display:flex;gap:6px;width:100%;max-width:100%;overflow:visible;min-width:0;flex-wrap:wrap;align-items:center}.selected-acount-label{text-align:left;flex:1;font-weight:400;transition:color var(--mscoa-chart-transition)}.selected-acount-label--error,.selected-acount-label--business-error{color:var(--mat-sys-error);font-weight:500}.selected-acount-label--tag{display:inline-block;padding:4px 10px;background-color:var(--lib-forms-primary-container);color:var(--lib-forms-on-primary-container);border-radius:16px;font-size:13px;font-weight:500;line-height:1.5;border:1px solid var(--lib-forms-primary);box-shadow:0 1px 2px #0000001a;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing);width:100%;max-width:100%;overflow:visible;white-space:normal;word-wrap:break-word;word-break:break-word;cursor:pointer;box-sizing:border-box;position:relative}.selected-acount-label--tag:hover{background-color:var(--sem-info-surface);box-shadow:0 2px 4px #1976d226}.segment-cell-content{display:flex;align-items:center;justify-content:flex-end;font-weight:500}.vat-badge{display:inline-flex;align-items:center;justify-content:center;height:16px;padding:2px 6px;border-radius:8px;font-size:9px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;background-color:var(--sem-success-surface);color:var(--sem-warning);border:1px solid var(--lib-forms-outline-variant);box-shadow:none;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),border-color var(--lib-forms-duration-hover) var(--lib-forms-easing);flex-shrink:0;align-self:flex-start;margin-top:2px;line-height:1}.vat-badge:hover{background-color:var(--sem-warning-surface);border-color:var(--sem-warning)}.vat-chip-container{padding-left:var(--mscoa-chart-spacing-sm);padding-right:var(--mscoa-chart-spacing-sm);padding-bottom:var(--mscoa-chart-spacing-xs);margin-top:var(--mscoa-chart-spacing-xs)}.vat-chip{display:inline-flex;align-items:center;gap:4px;height:24px;padding:4px 8px;border-radius:12px;font-size:11px;font-weight:600;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing),transform var(--lib-forms-duration-hover) var(--lib-forms-easing);box-shadow:0 1px 3px #0000001f}.vat-chip--applicable{background:linear-gradient(135deg,var(--sem-warning) 0%,var(--sem-warning) 100%);color:var(--lib-forms-on-primary);border:1px solid var(--sem-warning)}.vat-chip--applicable:hover{box-shadow:0 2px 6px #f57c004d;transform:translateY(-1px)}.vat-chip__icon{font-size:14px;width:14px;height:14px;opacity:.9}.vat-chip__text{font-size:11px;font-weight:600;letter-spacing:.3px}.info-box{display:flex;align-items:center;gap:var(--mscoa-chart-spacing-sm);padding:12px;background:var(--sem-info-surface);border-radius:var(--mscoa-chart-border-radius);margin-bottom:var(--mscoa-chart-spacing-md)}.info-icon{min-width:38px;margin:auto;margin-top:var(--mscoa-chart-spacing-sm)}.empty-state{padding:var(--mscoa-chart-spacing-md);text-align:center;display:flex;align-items:center;justify-content:center;gap:var(--mscoa-chart-spacing-sm);color:var(--mat-sys-on-surface-variant)}.validation-hints{margin-top:var(--mscoa-chart-spacing-md);padding:var(--mscoa-chart-spacing-md);background-color:var(--lib-forms-surface-container-low);border-radius:var(--mscoa-chart-border-radius);border-left:4px solid var(--lib-forms-primary);box-shadow:0 1px 3px #00000014}.validation-hints__title{font-weight:600;font-size:var(--mscoa-chart-font-size-base);margin:0 0 var(--mscoa-chart-spacing-sm) 0;color:var(--lib-forms-on-surface);display:flex;align-items:center;gap:var(--mscoa-chart-spacing-xs)}.validation-hints__title:before{content:\"\\1f4a1\";font-size:16px}.validation-hints__list{margin:0;padding-left:var(--mscoa-chart-spacing-md);color:var(--lib-forms-on-surface-variant);font-size:13px;line-height:1.6}.validation-hints__list li{margin-bottom:var(--mscoa-chart-spacing-sm);position:relative}.validation-hints__list li::marker{color:var(--lib-forms-primary)}.validation-hints__list li:last-child{margin-bottom:0}mat-error{font-size:.75em;margin-top:var(--mscoa-chart-spacing-xs)}mat-error ul{margin:0;padding-left:var(--mscoa-chart-spacing-md)}mat-error li{margin-bottom:var(--mscoa-chart-spacing-xs)}.loading-placeholder{padding:var(--mscoa-chart-spacing-md);color:var(--mat-sys-on-surface-variant)}.loading-spinner-container{display:flex;justify-content:center;align-items:center;height:256px}.error-state{padding:var(--mscoa-chart-spacing-md);color:var(--mat-sys-error)}mat-panel-description{font-size:.875em;line-height:1.4}:host .main-expanse-content{background:var(--mat-sys-surface-container)}@media(max-width:768px){.dual-basis-container{gap:var(--mscoa-chart-spacing-md)}.cell-button{min-height:44px;font-size:15px;max-width:300px}.content{padding:var(--mscoa-chart-spacing-md)}.validation-hints{font-size:13px;padding:var(--mscoa-chart-spacing-sm)}.inline-hint{font-size:11px}}.cell-button:focus-visible,button:focus-visible{outline:3px solid var(--mat-sys-primary);outline-offset:2px;outline-style:solid}@media(prefers-contrast:high){.cell-button{border:2px solid currentColor}.cell-button:focus-visible{outline-width:4px}.selected-acount-label--error{font-weight:600}}@media(prefers-reduced-motion:reduce){.cell-button,.success-indicator,.fade-in,.validated-indicator{animation:none;transition:none}}.table__cell--active{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}@media(prefers-contrast:high){.table__cell--active{background-color:var(--mat-sys-primary);color:var(--mat-sys-on-primary)}}.table__cell--business-error{background-color:var(--lib-forms-error-container);border-left:3px solid var(--lib-forms-error)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeInSuccess{0%{background-color:transparent}50%{background-color:var(--sem-success-surface)}to{background-color:var(--mat-sys-primary-container)}}@keyframes scaleIn{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes validatedShieldIn{0%{opacity:0;transform:scale(.6)}70%{opacity:1;transform:scale(1.1)}to{opacity:1;transform:scale(1)}}.fade-in{animation:fadeIn var(--mscoa-chart-transition)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.skeleton-loader{background:linear-gradient(90deg,var(--mat-sys-surface-container) 25%,var(--mat-sys-surface-container-high) 50%,var(--mat-sys-surface-container) 75%);background-size:200% 100%;animation:loading 1.5s ease-in-out infinite;border-radius:var(--mscoa-chart-border-radius)}@keyframes loading{0%{background-position:200% 0}to{background-position:-200% 0}}.skeleton-row{height:48px;margin-bottom:var(--mscoa-chart-spacing-xs)}.skeleton-cell{height:100%;margin-right:var(--mscoa-chart-spacing-md)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: PortalModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i6$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i6$1.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "ngmodule", type: MatTableModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MscoaChartInputMenuComponent, selector: "lib-mscoa-chart-input-menu", inputs: ["innerInput", "countdownSeconds", "hoveredId"], outputs: ["edit", "delete", "cancelDelete", "hoverStart", "hoverEnd"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i3.NgTemplateOutlet, i4$2.CdkPortalOutlet, i2.MatButton, i2.MatIconButton, i3$1.MatIcon, i6$1.MatMenuTrigger, i5$1.MatTable, i5$1.MatHeaderCellDef, i5$1.MatHeaderRowDef, i5$1.MatColumnDef, i5$1.MatCellDef, i5$1.MatRowDef, i5$1.MatHeaderCell, i5$1.MatCell, i5$1.MatHeaderRow, i5$1.MatRow, i5.MatTooltip, import('./ngx-t-forms-mscoa-chart-toolbar.component-C9hD1Cnq.mjs').then(m => m.MscoaChartToolbarComponent), import('./ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs').then(m => m.MscoaErrorDisplayComponent), import('./ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs').then(m => m.MscoaTemporaryHintComponent), i3.AsyncPipe, i3.TitleCasePipe, Promise.resolve().then(function () { return daysAgo_pipe; }).then(m => m.ConvertCamelCasePipe)]] }); }
|
|
32343
33505
|
}
|
|
32344
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: MscoaChartComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-mscoa-chart-toolbar.component-
|
|
33506
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: MscoaChartComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-mscoa-chart-toolbar.component-C9hD1Cnq.mjs').then(m => m.MscoaChartToolbarComponent), import('./ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs').then(m => m.MscoaErrorDisplayComponent), import('./ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs').then(m => m.MscoaTemporaryHintComponent), Promise.resolve().then(function () { return daysAgo_pipe; }).then(m => m.ConvertCamelCasePipe)], resolveMetadata: (MscoaChartToolbarComponent, MscoaErrorDisplayComponent, MscoaTemporaryHintComponent, ConvertCamelCasePipe) => ({ decorators: [{
|
|
32345
33507
|
type: Component,
|
|
32346
33508
|
args: [{ selector: 'lib-mscoa-chart', imports: [
|
|
32347
33509
|
CommonModule,
|
|
@@ -36251,5 +37413,5 @@ const getSignatureImage = async (inputConfig, value, secret) => {
|
|
|
36251
37413
|
* Generated bundle index. Do not edit.
|
|
36252
37414
|
*/
|
|
36253
37415
|
|
|
36254
|
-
export { ValidationExpressioCreatorComponent as $, ApiValueAccessRulesComponent as A, BaseCustomInput as B, mergeHeaderOptions as C, DaysAgoPipe as D, EmptyStateComponent as E, FormsStoreService as F, PostmanCollectionLoaderService as G, TreeComponent as H, convertPostmanFolderItemsToTree as I, JsonEditorComponent as J, buildTokenMaps as K, bindableFields as L, fieldEditorBindings as M, NGX_T_FORMS_CONFIG_TOKEN as N, mapTemplateTokens as O, PREDICATE_OPERATORS as P, NESTED_EDITOR_COMPONENT as Q, safeReturnDeepProperty as R, DialogTemplateComponent as S, TDynamicDataEditComponent as T, FormBuilderComponent as U, FormsComponent as V, MscoaFormInputComponent as W, SignatureInputElementComponent as X, TFormInputComponent as Y, UserFormStepperComponent as Z, _isEqual as _, assignDeepPropertyToObject as a,
|
|
36255
|
-
//# sourceMappingURL=ngx-t-forms-ngx-t-forms-
|
|
37416
|
+
export { ValidationExpressioCreatorComponent as $, ApiValueAccessRulesComponent as A, BaseCustomInput as B, mergeHeaderOptions as C, DaysAgoPipe as D, EmptyStateComponent as E, FormsStoreService as F, PostmanCollectionLoaderService as G, TreeComponent as H, convertPostmanFolderItemsToTree as I, JsonEditorComponent as J, buildTokenMaps as K, bindableFields as L, fieldEditorBindings as M, NGX_T_FORMS_CONFIG_TOKEN as N, mapTemplateTokens as O, PREDICATE_OPERATORS as P, NESTED_EDITOR_COMPONENT as Q, safeReturnDeepProperty as R, DialogTemplateComponent as S, TDynamicDataEditComponent as T, FormBuilderComponent as U, FormsComponent as V, MscoaFormInputComponent as W, SignatureInputElementComponent as X, TFormInputComponent as Y, UserFormStepperComponent as Z, _isEqual as _, assignDeepPropertyToObject as a, decrypt as a$, getSignatureImage as a0, DataTreeComponent as a1, getInputErrorMessage as a2, TFormInputStatusComponent as a3, resolveDateRangeControlNames as a4, calculateListOveralFunctions as a5, multipleInputRowIdKey as a6, SPREADSHEET_WRITER as a7, SPREADSHEET_PARSER as a8, TFormImportController as a9, FORM_DRAFT_ORCHESTRATOR as aA, FORM_INPUTS_TOKEN as aB, FORM_ROUTE_SOURCE as aC, FORM_SLIDES_TOKEN as aD, FORM_SUGGESTION_REGISTRY as aE, FormDraftOrchestrator as aF, FormSuggestionRegistry as aG, FormSuggestionRegistryService as aH, FormTowerControllerService as aI, HashbrownFormDraftOrchestratorService as aJ, HttpPipelineRepository as aK, IMPORT_TOWER_INSTANCE_ID as aL, INPUT_SECRET_TOKEN as aM, MSCOA_TREE_PROVIDER as aN, MULTIPLE_FORM_INPUT_TOKEN as aO, NgxTFormsComponent as aP, NgxTFormsService as aQ, PIPELINE_REPOSITORY as aR, PipelineRepository as aS, PropertyAccessError as aT, TFormDraftPanelComponent as aU, TSuggestionReviewComponent as aV, UTILS_OBJECT_TOKEN as aW, buildBlueprintSchema as aX, buildBriefSchema as aY, buildSuggestionSchema as aZ, createFileFromBase64 as a_, isMultiSelectInput as aa, applyOptionChoice as ab, normaliseOptionText as ac, readDocumentIdentifier as ad, DOCUMENT_REPOSITORY as ae, DEFAULT_DOCUMENT_PAGE_SIZE as af, DEFAULT_DOCUMENT_SORT as ag, DocumentPickerConfigurationError as ah, readDocumentPath as ai, readDocumentId as aj, toDocumentReference as ak, FormatDataPipe as al, readDocumentReferences as am, writeDocumentValue as an, resolveIdentifierPath as ao, fuzzySearch as ap, returnMappedPathValue as aq, ACCOUNTING_BASIS as ar, getToolbarColor as as, getToolbarBackground as at, getToolbarIconColor as au, AI_ENDPOINT_CATALOG as av, AI_FORM_BUILDER_CONFIG as aw, AI_MSCOA_GROUNDING as ax, FORM_ACTIONS_TOKEN as ay, FORM_CONFIG_TOKEN as az, getInputIcon as b, formGenerator as b0, generateSecretKey as b1, getPipedValueFromDataType as b2, getSampleValueForInput as b3, getSectionElements as b4, getUrl as b5, getValueFromValueAccessor as b6, initFormConfigToV2 as b7, provideNgxTForms as b8, returnDeepProperty as b9, sheetConsolodation as ba, textIconsForUserHints as bb, toSuggestionBatch as bc, validateExpressionSyntax as bd, validateObjectAgainstString as be, withAiEndpointCatalog as bf, withAiFormBuilder as bg, withAiMscoaGrounding as bh, withFormSuggestions as bi, withHttpPipeline as bj, withInputSecret as bk, withRouterFormId as bl, withSpreadsheetImport as bm, formatData_pipe as bn, TDynamicDataViewComponent as c, TFormEngine as d, TourManagerService as e, getSubmissionStatusFn as f, getAvatar as g, parseConditions as h, evaluatePredicate as i, emptyCondition as j, deriveObservedInputs as k, ErrorListComponent as l, deriveDefaultPayloadTemplate as m, collectHeaderTemplateInputIds as n, collectQueryTemplateInputIds as o, parseInfixFormula as p, collectTemplateInputIds as q, referencedTokens as r, serializeConditions as s, testAgainstItem as t, collectMinInputDepIds as u, resolveHeaderTemplate as v, resolveQueryTemplate as w, resolvePayloadTemplate as x, returnMappedData as y, mergeQueryOptions as z };
|
|
37417
|
+
//# sourceMappingURL=ngx-t-forms-ngx-t-forms-XLA9yzak.mjs.map
|