ngx-t-forms 2.0.37 → 3.1.0
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-auto-complete-input-element.component-D_l5sbNh.mjs → ngx-t-forms-auto-complete-input-element.component-FhUHTsUF.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-D_l5sbNh.mjs.map → ngx-t-forms-auto-complete-input-element.component-FhUHTsUF.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-fJIsRm0v.mjs → ngx-t-forms-basic-input-input-element.component-BJKe9wIA.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-fJIsRm0v.mjs.map → ngx-t-forms-basic-input-input-element.component-BJKe9wIA.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-FQLTI7CX.mjs +643 -0
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-FQLTI7CX.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-L1kPy15K.mjs → ngx-t-forms-chip-options-creator-editor.component-CJtbprXS.mjs} +4 -4
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-CJtbprXS.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CU6Cp-oK.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-CU6R5h-x.mjs} +4 -4
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CU6R5h-x.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-data-source-picker.component-C8MBbnfz.mjs +261 -0
- package/fesm2022/ngx-t-forms-data-source-picker.component-C8MBbnfz.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-DsjcLQ5A.mjs → ngx-t-forms-date-picker-input-element.component-Dux6uy66.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-DsjcLQ5A.mjs.map → ngx-t-forms-date-picker-input-element.component-Dux6uy66.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-SMWrTm5X.mjs +157 -0
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-SMWrTm5X.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-uGM93dvc.mjs +373 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-uGM93dvc.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-document-picker.component-DIqaaBSl.mjs +1259 -0
- package/fesm2022/ngx-t-forms-document-picker.component-DIqaaBSl.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-editor-input-element.component-CIELjDty.mjs +417 -0
- package/fesm2022/ngx-t-forms-editor-input-element.component-CIELjDty.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-editor-js-input.component-C1dI_7rU.mjs +553 -0
- package/fesm2022/ngx-t-forms-editor-js-input.component-C1dI_7rU.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-_RBYRgn9.mjs → ngx-t-forms-file-upload-input-element.component-CQsKz87N.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-_RBYRgn9.mjs.map → ngx-t-forms-file-upload-input-element.component-CQsKz87N.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-input-selector.component-Dj0jvBdm.mjs +86 -0
- package/fesm2022/ngx-t-forms-form-input-selector.component-Dj0jvBdm.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-form-json-view.component-D9rU9vxT.mjs → ngx-t-forms-form-json-view.component-DzJKFl4c.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-D9rU9vxT.mjs.map → ngx-t-forms-form-json-view.component-DzJKFl4c.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs +179 -0
- package/fesm2022/ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-CqCL3Bnc.mjs → ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-CqCL3Bnc.mjs.map → ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-wmRDJU4P.mjs → ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs} +12 -12
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-wmRDJU4P.mjs.map → ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-geo-location.component-CMbBSXe0.mjs → ngx-t-forms-geo-location.component-Bj_qIEqi.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-geo-location.component-CMbBSXe0.mjs.map → ngx-t-forms-geo-location.component-Bj_qIEqi.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-header-template-editor.component-DLldVmcN.mjs +129 -0
- package/fesm2022/ngx-t-forms-header-template-editor.component-DLldVmcN.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-Cbq8OYk7.mjs → ngx-t-forms-image-capture-input-element.component-lwp3IcDt.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-Cbq8OYk7.mjs.map → ngx-t-forms-image-capture-input-element.component-lwp3IcDt.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-index-CPNvE4PP.mjs → ngx-t-forms-index-C8NtLE16.mjs} +2 -2
- package/fesm2022/ngx-t-forms-index-C8NtLE16.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-custom.component-uNVdF9aA.mjs → ngx-t-forms-input-custom.component-DiciFhSS.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-input-custom.component-uNVdF9aA.mjs.map → ngx-t-forms-input-custom.component-DiciFhSS.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-input-editor.component-D12hrHOc.mjs +190 -0
- package/fesm2022/ngx-t-forms-input-editor.component-D12hrHOc.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-D0SGS9xQ.mjs → ngx-t-forms-map-mat-options-keys-C2JpMTEc.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-D0SGS9xQ.mjs.map → ngx-t-forms-map-mat-options-keys-C2JpMTEc.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-C1Qrze7K.mjs +167 -0
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-C1Qrze7K.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs → ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs} +3 -3
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs → ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs} +3 -3
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-CxF6Ljjf.mjs → ngx-t-forms-missing-form-configs.component-BaTR_jzc.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-CxF6Ljjf.mjs.map → ngx-t-forms-missing-form-configs.component-BaTR_jzc.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-BqT5Z8SM.mjs → ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-BqT5Z8SM.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-99DpVSy7.mjs → ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-99DpVSy7.mjs.map → ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs +447 -0
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs → ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs.map → ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs +905 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-DQ_h-jPF.mjs → ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs} +2188 -249
- package/fesm2022/ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-paginated-selection-table-DHwojPhn.mjs → ngx-t-forms-paginated-selection-table-pYY2sWAb.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-paginated-selection-table-DHwojPhn.mjs.map → ngx-t-forms-paginated-selection-table-pYY2sWAb.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs +79 -0
- package/fesm2022/ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs +748 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-record-list-manager.component-CtCOIpai.mjs +446 -0
- package/fesm2022/ngx-t-forms-record-list-manager.component-CtCOIpai.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-D9wIdOhg.mjs +272 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-D9wIdOhg.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-D3sa7sNg.mjs → ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs} +39 -8
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-search-field.component-mR4Kk12C.mjs +38 -0
- package/fesm2022/ngx-t-forms-search-field.component-mR4Kk12C.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-section-report.component-D6jakGa5.mjs → ngx-t-forms-section-report.component-U9uQ_Ow9.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-section-report.component-D6jakGa5.mjs.map → ngx-t-forms-section-report.component-U9uQ_Ow9.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-select-input-element.component-CwqIck0h.mjs → ngx-t-forms-select-input-element.component-CxYTmuvV.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-select-input-element.component-CwqIck0h.mjs.map → ngx-t-forms-select-input-element.component-CxYTmuvV.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs +169 -0
- package/fesm2022/ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs +263 -0
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-D4dEi8Vs.mjs → ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-D4dEi8Vs.mjs.map → ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-BZiTFB0j.mjs → ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-BZiTFB0j.mjs.map → ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs +173 -0
- package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-validators-config.component-EM7RSWIz.mjs +574 -0
- package/fesm2022/ngx-t-forms-validators-config.component-EM7RSWIz.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-DD6Fhx06.mjs → ngx-t-forms-workflow-adjudication.component-C1Em-g9e.mjs} +17 -17
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-C1Em-g9e.mjs.map +1 -0
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/package.json +2 -2
- package/styles/_editor-mixins.scss +117 -117
- package/styles/_signature-pad.scss +26 -26
- package/styles/_tokens.scss +148 -148
- package/types/ngx-t-forms.d.ts +14 -2
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-B8Do3h4B.mjs +0 -643
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-B8Do3h4B.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-L1kPy15K.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CU6Cp-oK.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-data-source-picker.component-r7OGAsxo.mjs +0 -261
- package/fesm2022/ngx-t-forms-data-source-picker.component-r7OGAsxo.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-B8V7IpoK.mjs +0 -156
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-B8V7IpoK.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-hKJqVYUY.mjs +0 -373
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-hKJqVYUY.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-picker.component-f-hz6Vef.mjs +0 -704
- package/fesm2022/ngx-t-forms-document-picker.component-f-hz6Vef.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-editor-input-element.component-D38U94oj.mjs +0 -294
- package/fesm2022/ngx-t-forms-editor-input-element.component-D38U94oj.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-editor-js-input.component-D_Jq7sfY.mjs +0 -240
- package/fesm2022/ngx-t-forms-editor-js-input.component-D_Jq7sfY.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-input-selector.component-CUwK3DqG.mjs +0 -86
- package/fesm2022/ngx-t-forms-form-input-selector.component-CUwK3DqG.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs +0 -179
- package/fesm2022/ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-index-CPNvE4PP.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-editor.component-BWoKhlI3.mjs +0 -190
- package/fesm2022/ngx-t-forms-input-editor.component-BWoKhlI3.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-Cu-KiAeY.mjs +0 -66
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-Cu-KiAeY.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BT-dM_5C.mjs +0 -447
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BT-dM_5C.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-DXAh2Mbm.mjs +0 -905
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-DXAh2Mbm.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-DQ_h-jPF.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-payload-template-editor.component-CAXdFu4E.mjs +0 -203
- package/fesm2022/ngx-t-forms-payload-template-editor.component-CAXdFu4E.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-pipeline-generator.component-BJQ-KnmU.mjs +0 -748
- package/fesm2022/ngx-t-forms-pipeline-generator.component-BJQ-KnmU.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-record-list-manager.component-BoD3S_7u.mjs +0 -358
- package/fesm2022/ngx-t-forms-record-list-manager.component-BoD3S_7u.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-C-E3fQu6.mjs +0 -272
- package/fesm2022/ngx-t-forms-required-inputs.component-C-E3fQu6.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-D3sa7sNg.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs +0 -38
- package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-selection-options-editor.component-Coj9gnrq.mjs +0 -169
- package/fesm2022/ngx-t-forms-selection-options-editor.component-Coj9gnrq.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-DqFMP1rZ.mjs +0 -204
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-DqFMP1rZ.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-validators-config.component-B3K9nLxx.mjs +0 -574
- package/fesm2022/ngx-t-forms-validators-config.component-B3K9nLxx.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-DD6Fhx06.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-calculated-field-rules.component-B8Do3h4B.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/formula-tex.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/math-preview.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/calculated-field-rules.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/calculated-field-rules.component.html"],"sourcesContent":["import { parse } from 'mathjs';\n\n/** Outcome of parsing a user-typed infix expression. */\nexport interface FormulaParseResult {\n /** LaTeX rendering of the expression, or `null` when it is empty/invalid. */\n readonly tex: string | null;\n /** A non-technical validation message, or `null` when the expression is valid (or empty). */\n readonly error: string | null;\n}\n\n/**\n * Parses a strictly-infix expression (the format `math.evaluate` consumes) and,\n * when it is syntactically valid, returns its LaTeX form for KaTeX to render.\n *\n * The expression is never rewritten — what the user types is what gets stored\n * and later evaluated by mathjs. This only *reads* it to derive a preview and a\n * friendly validity message; an empty expression is treated as \"not yet valid\"\n * rather than an error.\n */\nexport function parseInfixFormula(expression: string): FormulaParseResult {\n const trimmed = expression.trim();\n if (!trimmed) {\n return { tex: null, error: null };\n }\n try {\n return { tex: parse(trimmed).toTex(), error: null };\n } catch (error) {\n return { tex: null, error: friendlyMessage(error) };\n }\n}\n\n/** Maps mathjs' technical parser errors onto guidance a non-technical user can act on. */\nfunction friendlyMessage(error: unknown): string {\n const raw = error instanceof Error ? error.message : '';\n if (/end of expression/i.test(raw)) {\n return 'The equation looks unfinished — add the missing number or variable.';\n }\n if (/parenthesis|bracket/i.test(raw)) {\n return 'Check that every opening bracket \"(\" has a matching closing bracket \")\".';\n }\n if (/value expected/i.test(raw)) {\n return 'An operator (like + or ×) is missing a number or variable next to it.';\n }\n if (/unexpected/i.test(raw)) {\n return 'There is an unexpected symbol in the equation.';\n }\n return 'This equation is not valid yet.';\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n PLATFORM_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport katex from 'katex';\n\nimport { parseInfixFormula } from './formula-tex';\n\n/**\n * Read-only \"natural maths\" preview of a strictly-infix expression.\n *\n * It parses the expression with mathjs and renders the result as MathML via\n * KaTeX (no stylesheet required — the browser draws the glyphs natively). The\n * expression itself is never modified, so what is previewed is exactly what\n * `math.evaluate` will later consume.\n *\n * Internal to `t-dynamic-data-edit` — not part of the library's public surface.\n */\n@Component({\n selector: 'lib-math-preview',\n template: '',\n styleUrl: './math-preview.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n 'class': 'lib-math-preview',\n '[attr.data-state]': 'state()',\n },\n})\nexport class MathPreviewComponent {\n /** Strictly-infix expression to render (mathjs syntax, e.g. `((a+2)/(b-1))*2`). */\n readonly expression = input<string>('');\n\n /** Text shown when there is nothing to preview. */\n readonly placeholder = input<string>('Nothing to preview yet');\n\n /** `'empty'` when no expression is set, otherwise `'rendered'`. */\n protected readonly state = computed<'empty' | 'rendered'>(() =>\n this.expression().trim() ? 'rendered' : 'empty',\n );\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly #isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n constructor() {\n effect(() => {\n const expression = this.expression().trim();\n const placeholder = this.placeholder();\n const element = this.#host.nativeElement;\n\n // On the server KaTeX has no DOM to render into — fall back to plain text.\n if (!this.#isBrowser) {\n element.textContent = expression || placeholder;\n return;\n }\n if (!expression) {\n element.textContent = placeholder;\n return;\n }\n\n const { tex } = parseInfixFormula(expression);\n if (tex == null) {\n // Mid-edit / not yet valid: show the raw infix until it parses cleanly.\n element.textContent = expression;\n return;\n }\n katex.render(tex, element, {\n output: 'mathml',\n throwOnError: false,\n displayMode: true,\n });\n });\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n ViewEncapsulation,\n computed,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, NgControl } from '@angular/forms';\nimport { MatSelectChange, MatSelectModule } from '@angular/material/select';\nimport { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { Subject } from 'rxjs';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport {\n CalculatedFieldRules,\n CalculationFunctions,\n FormColumnInputs,\n TableConfigurationsInterface,\n calculationVariableInterface,\n} from 'ngx-t-forms-types';\n\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\nimport { _isEqual } from '../../../../shared/functions/isEqual';\nimport { MathPreviewComponent } from './math-preview.component';\nimport { parseInfixFormula } from './formula-tex';\n\n/** Escapes a string for safe inclusion as a literal inside a `RegExp`. */\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n/** One selectable rounding strategy shown as a chip option. */\ninterface RoundingOption {\n readonly value: 'FLOOR' | 'CEIL' | 'ROUND';\n readonly label: string;\n}\n\n/** One operator-palette button: the glyph shown, the infix token it inserts. */\ninterface OperatorKey {\n /** Glyph rendered on the button. */\n readonly label: string;\n /** Strictly-infix token inserted into the equation (mathjs syntax). */\n readonly token: string;\n /** Characters to step the caret back after insertion (e.g. land inside `()`). */\n readonly caretBack: number;\n /** Accessible name for the button. */\n readonly aria: string;\n}\n\n/** Live syntactic state of the equation, surfaced to the user as plain guidance. */\ninterface FormulaStatus {\n readonly kind: 'empty' | 'valid' | 'invalid';\n readonly message: string;\n}\n\n// ControlValueAccessor write callback. Angular types the registered change\n// handler as `(value: any) => void`; the alias keeps that `any` contained to one\n// place rather than repeating an eslint-disable on every reference.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Angular CVA mandates an untyped change callback.\ntype CvaChange = (value: any) => void;\n\n/**\n * Internal calculated-field-rules editor implementing\n * `MatFormFieldControl<CalculatedFieldRules | undefined>` and\n * `ControlValueAccessor`.\n *\n * Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,\n * hint, and validation errors — so this component owns only its two modes: a\n * read-only formula summary (view) and a sectioned editor (edit) for the\n * formula, its variables, the optional formula source link, and the rounding\n * settings.\n *\n * NOTE: `MatFormFieldControl<T>` and `ControlValueAccessor` mandate plain\n * mutable `value` / `placeholder` / `required` / `disabled` / `id` members,\n * `@Input()` decorators on them, the `focused` / `touched` / `stateChanges` /\n * `onChange` / `onTouched` members, and the `useExisting` provider. These are\n * framework wiring, not defects — the CLAUDE.md bans on `@Input()` /\n * `useExisting` do not apply to MatFormFieldControl integration. Genuinely\n * internal state is signal-based.\n */\n@Component({\n selector: 'lib-calculated-field-rules',\n templateUrl: './calculated-field-rules.component.html',\n styleUrls: ['./calculated-field-rules.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n imports: [\n CommonModule,\n FormsModule,\n MathPreviewComponent,\n OverlayModule,\n MatFormFieldModule,\n MatInputModule,\n MatSelectModule,\n MatIconModule,\n MatCardModule,\n MatButtonModule,\n MatChipsModule,\n ],\n providers: [{ provide: MatFormFieldControl, useExisting: CalculatedFieldRulesComponent }],\n host: {\n 'class': 'lib-calculated-field-rules',\n '[attr.aria-describedby]': 'describedBy',\n },\n})\nexport class CalculatedFieldRulesComponent\n implements OnDestroy, MatFormFieldControl<CalculatedFieldRules | undefined>\n{\n static nextId = 0;\n\n // #region MatFormFieldControl framework members (plain mutable — not signals)\n @Input() placeholder = '';\n @Input() required = false;\n @Input() disabled = false;\n\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'app-calculated-field-rules';\n readonly id = `app-calculated-field-rules-${CalculatedFieldRulesComponent.nextId++}`;\n\n focused = false;\n touched = false;\n describedBy = '';\n // #endregion\n\n // #region Non-MFC inputs / outputs (contract preserved exactly)\n /** Owning input definition; supplies table mode and the formula-source map. */\n readonly mapToData = input<FormColumnInputs | undefined>(undefined);\n /** All form inputs available to bind as calculation variables. */\n readonly formInputs = input<Array<FormColumnInputs>>([]);\n /** Validation errors surfaced by the parent for error-state derivation. */\n readonly errors = input<IConfigElementError[] | undefined>([]);\n\n /** Retained on the contract; reserved for path-scoped value emission. */\n readonly valueChange2dWithPath = output<unknown>();\n /** Emits the persisted rules whenever the editor commits a new value. */\n readonly valueChanged = output<CalculatedFieldRules | null>();\n // #endregion\n\n // #region Internal signal state\n /** Whether the editor card is open (edit mode) versus the summary (view). */\n protected readonly isEditing = signal(false);\n /** Working copy edited in the card; committed to `value` on save. */\n protected readonly tempValue = signal<CalculatedFieldRules>({} as CalculatedFieldRules);\n\n /** Whether the inline `$` field-picker is open. */\n protected readonly pickerOpen = signal(false);\n /** Text typed after `$`, used to filter the field-picker. */\n protected readonly pickerQuery = signal('');\n /** Keyboard-highlighted result in the field-picker. */\n protected readonly pickerActiveIndex = signal(0);\n\n /** Index of the `$` that opened the picker, and the caret at that moment. */\n #dollarIndex = -1;\n #cursorPosition = 0;\n // #endregion\n\n protected readonly roundingType: readonly RoundingOption[] = [\n { value: 'ROUND', label: 'Nearest' },\n { value: 'FLOOR', label: 'Round down' },\n { value: 'CEIL', label: 'Round up' },\n ];\n\n /** Operator palette inserted into the equation; glyphs are friendly, tokens are infix. */\n protected readonly operatorKeys: readonly OperatorKey[] = [\n { label: '+', token: ' + ', caretBack: 0, aria: 'Add' },\n { label: '−', token: ' - ', caretBack: 0, aria: 'Subtract' },\n { label: '×', token: ' * ', caretBack: 0, aria: 'Multiply' },\n { label: '÷', token: ' / ', caretBack: 0, aria: 'Divide' },\n { label: '( )', token: '()', caretBack: 1, aria: 'Brackets' },\n { label: 'xⁿ', token: '^', caretBack: 0, aria: 'Power' },\n ];\n\n /** The equation textarea, used for caret-aware token insertion. */\n protected readonly formulaInputRef =\n viewChild<ElementRef<HTMLTextAreaElement>>('formulaInput');\n\n /** Live, non-technical validity of the working equation (drives the preview banner). */\n protected readonly formulaStatus = computed<FormulaStatus>(() => {\n const formula = (this.tempValue().formula ?? '').trim();\n if (!formula) {\n return { kind: 'empty', message: 'Start building your equation below.' };\n }\n const { error } = parseInfixFormula(formula);\n return error\n ? { kind: 'invalid', message: error }\n : { kind: 'valid', message: 'This equation is valid.' };\n });\n\n /** Number-typed inputs that may back a calculation variable. */\n protected readonly cachedNumberInputs = computed<FormColumnInputs[]>(() =>\n this.formInputs().filter(\n (input) => input.dataType === 'number' || input.type === 'number',\n ),\n );\n\n /** Field-picker results: number inputs filtered by the text typed after `$`. */\n protected readonly pickerResults = computed<FormColumnInputs[]>(() => {\n const query = this.pickerQuery().trim().toLowerCase();\n const inputs = this.cachedNumberInputs();\n if (!query) {\n return inputs;\n }\n return inputs.filter(\n (input) =>\n input.label?.toLowerCase().includes(query) ||\n input.formControlName?.toLowerCase().includes(query),\n );\n });\n\n /** Every calculation function offered as a list-aggregation chip. */\n protected readonly allCalculationFunction = computed<CalculationFunctions[]>(() =>\n Object.values(CalculationFunctions),\n );\n\n /** True when this editor targets a table column rather than a scalar input. */\n protected readonly tableMode = computed<boolean>(() => !!this.mapToData()?.tableConfig);\n\n /** Table configuration when in table mode. */\n protected readonly tableConfig = computed<TableConfigurationsInterface | undefined>(\n () => this.mapToData()?.tableConfig,\n );\n\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngOnDestroy(): void {\n this.stateChanges.next();\n this.stateChanges.complete();\n }\n\n // #region Value accessor & MatFormFieldControl logic\n\n #value: CalculatedFieldRules | undefined;\n\n @Input()\n get value(): CalculatedFieldRules | undefined {\n return this.#value;\n }\n set value(val: CalculatedFieldRules | undefined) {\n if (_isEqual(this.#value, val)) {\n return;\n }\n this.#value = val ? { ...val } : undefined;\n this.stateChanges.next();\n this.valueChanged.emit(this.#value ?? null);\n this.onChange(this.#value);\n }\n\n // MatFormFieldControl reads these as plain getters during its own change\n // detection, so they stay getters rather than `computed()` signals.\n get empty(): boolean {\n return !this.#value;\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get errorState(): boolean {\n const hasCustomError = (this.errors() ?? []).length > 0;\n const hasControlError = this.ngControl?.control?.errors != null;\n return (\n (this.touched && (hasControlError || hasCustomError)) ||\n (this.required && !this.#value)\n );\n }\n\n // ControlValueAccessor — Angular registers an untyped change callback.\n onChange: CvaChange = () => {};\n onTouched: () => void = () => {};\n\n writeValue(value: CalculatedFieldRules): void {\n this.value = value;\n }\n\n registerOnChange(fn: CvaChange): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.stateChanges.next();\n }\n\n setDescribedByIds(ids: string[]): void {\n const controlElement = this.#elementRef.nativeElement.querySelector(\n '.app-calculated-field-rules',\n );\n controlElement?.setAttribute('aria-describedby', ids.join(' '));\n this.describedBy = ids.join(' ');\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n if (!this.focused) {\n this.focused = true;\n this.stateChanges.next();\n }\n this.markAsTouched();\n }\n\n markAsTouched(): void {\n if (!this.touched) {\n this.onTouched();\n this.touched = true;\n this.stateChanges.next();\n }\n }\n\n // #endregion\n\n // #region Edit-mode lifecycle\n\n protected startEdit(): void {\n this.tempValue.set(\n this.#value ? structuredClone(this.#value) : ({} as CalculatedFieldRules),\n );\n this.isEditing.set(true);\n this.markAsTouched();\n }\n\n protected saveEdit(): void {\n this.value = this.tempValue();\n this.isEditing.set(false);\n }\n\n protected cancelEdit(): void {\n this.isEditing.set(false);\n this.tempValue.set({} as CalculatedFieldRules);\n }\n\n // #endregion\n\n // #region Formula / variable editing (operates on tempValue)\n\n protected checkIfInputCanBeLinkedToCalVariable(\n currentInput: FormColumnInputs | undefined,\n inputToDisable: {\n formControlName: unknown;\n parentInput?: unknown;\n multipleInputInEditId?: unknown;\n },\n ): boolean {\n if (!currentInput) {\n return false;\n }\n if (currentInput.formControlName === inputToDisable.formControlName) {\n return true;\n }\n if (!currentInput.multipleInputInEditId) {\n return !!inputToDisable.parentInput || !!inputToDisable.multipleInputInEditId;\n }\n return false;\n }\n\n protected linkFormulaSource(event: MatSelectChange): void {\n // Resetting formula to undefined intentionally during edit; persisted value\n // re-validates on save.\n this.tempValue.update((current) => ({\n ...current,\n formControlWithFormula: event.value,\n formula: '',\n }));\n }\n\n protected removeVariable(variableId: string): void {\n const current = this.tempValue();\n const variables = current.variables ?? [];\n const target = variables.find((v) => v.id === variableId);\n let formula = current.formula ?? '';\n if (target?.variable) {\n formula = formula\n .replace(new RegExp(`\\\\b${escapeRegExp(target.variable)}\\\\b`, 'g'), '')\n .replace(/\\s{2,}/g, ' ')\n .trim();\n }\n this.tempValue.set({\n ...current,\n variables: variables.filter((v) => v.id !== variableId),\n formula,\n });\n }\n\n protected appendVariableToFormula(variableName: string): void {\n // A variable carries no spacing of its own, so pad it only where it would\n // otherwise fuse with an adjacent token (e.g. `ab` instead of `a b`).\n const { before, after } = this.#caretSlices();\n const lead = before.length > 0 && !/[\\s(]$/.test(before) ? ' ' : '';\n const trail = after.length > 0 && !/^[\\s)]/.test(after) ? ' ' : '';\n this.insertToken(`${lead}${variableName}${trail}`, trail ? 1 : 0);\n }\n\n protected setFormula(formula: string): void {\n this.tempValue.update((current) => ({ ...current, formula }));\n }\n\n /**\n * Inserts an infix token at the caret (or appends it when the textarea is not\n * focused), then restores the caret just after the insertion. Used by both the\n * operator palette and the variable chips so the equation reads naturally while\n * staying strictly infix.\n */\n protected insertToken(token: string, caretBack = 0): void {\n const element = this.formulaInputRef()?.nativeElement;\n const { before, after } = this.#caretSlices();\n const next = before + token + after;\n\n this.setFormula(next);\n\n if (!element) {\n return;\n }\n const caret = before.length + token.length - caretBack;\n // Restore focus + caret after Angular has written the new value back to the DOM.\n setTimeout(() => {\n element.focus();\n element.setSelectionRange(caret, caret);\n });\n }\n\n /** The formula split around the current caret/selection (end-of-string when unfocused). */\n #caretSlices(): { before: string; after: string } {\n const current = this.tempValue().formula ?? '';\n const element = this.formulaInputRef()?.nativeElement;\n const start = element?.selectionStart ?? current.length;\n const end = element?.selectionEnd ?? current.length;\n return { before: current.slice(0, start), after: current.slice(end) };\n }\n\n protected setDecimalPlaces(value: number | string | null): void {\n const parsed =\n value === null || value === '' ? undefined : Number(value);\n this.tempValue.update((current) => ({\n ...current,\n decimalPlaces: parsed !== undefined && Number.isFinite(parsed) ? parsed : undefined,\n }));\n }\n\n protected setRoundingMode(mode: 'FLOOR' | 'CEIL' | 'ROUND'): void {\n this.tempValue.update((current) => ({ ...current, roundingMode: mode }));\n }\n\n /** Friendly label for a stored rounding mode, used in the read-only summary. */\n protected roundingLabel(mode: 'FLOOR' | 'CEIL' | 'ROUND' | undefined): string {\n return this.roundingType.find((option) => option.value === mode)?.label ?? 'nearest';\n }\n\n // #endregion\n\n // #region Inline `$` field-picker & variable binding\n\n /** Formula text changed: persist it and re-evaluate whether the `$` picker should show. */\n protected onFormulaChange(value: string): void {\n this.setFormula(value);\n this.#syncPicker();\n }\n\n /** Caret moved (click / arrow keys / focus): re-evaluate the `$` picker against the new caret. */\n protected onFormulaCaret(): void {\n this.#syncPicker();\n }\n\n /** Closes the picker shortly after blur, leaving time for a result click to register. */\n protected onFormulaBlur(): void {\n setTimeout(() => this.closePicker(), 150);\n }\n\n /** Keyboard control for the open picker: navigate, select, dismiss. */\n protected onFormulaKeydown(event: KeyboardEvent): void {\n if (!this.pickerOpen()) {\n return;\n }\n const results = this.pickerResults();\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.pickerActiveIndex.update((i) => Math.min(i + 1, results.length - 1));\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.pickerActiveIndex.update((i) => Math.max(i - 1, 0));\n break;\n case 'Enter': {\n const item = results[this.pickerActiveIndex()];\n if (item) {\n event.preventDefault();\n this.selectField(item);\n }\n break;\n }\n case 'Escape':\n event.preventDefault();\n this.closePicker();\n break;\n }\n }\n\n protected closePicker(): void {\n this.pickerOpen.set(false);\n this.pickerActiveIndex.set(0);\n this.#dollarIndex = -1;\n }\n\n /**\n * Binds a form field to a calculation variable and drops its short token into\n * the equation. Reuses an existing scalar binding for the same field; otherwise\n * mints the next free short name (a, b, c, …). When opened from `$`, the typed\n * `$query` is replaced in place; otherwise the token is appended.\n */\n protected selectField(input: FormColumnInputs): void {\n const current = this.tempValue();\n const variables = current.variables ?? [];\n const existing = variables.find(\n (v) => v.formControlName === input.formControlName && !v.function && !v.parentInputId,\n );\n const token = existing ? existing.variable : this.#nextShortName();\n const nextVars = existing ? variables : [...variables, this.#makeVariable(input, token)];\n\n const formula = current.formula ?? '';\n let nextFormula: string;\n let caret: number;\n if (this.pickerOpen() && this.#dollarIndex >= 0) {\n const before = formula.slice(0, this.#dollarIndex);\n const after = formula.slice(this.#cursorPosition);\n const lead = before.length > 0 && !/[\\s(]$/.test(before) ? ' ' : '';\n const insert = `${lead}${token} `;\n nextFormula = before + insert + after;\n caret = (before + insert).length;\n } else {\n const lead = formula.length > 0 && !/[\\s(]$/.test(formula) ? ' ' : '';\n nextFormula = `${formula}${lead}${token} `;\n caret = nextFormula.length;\n }\n\n this.tempValue.set({ ...current, formula: nextFormula, variables: nextVars });\n this.closePicker();\n\n const element = this.formulaInputRef()?.nativeElement;\n if (element) {\n setTimeout(() => {\n element.focus();\n element.setSelectionRange(caret, caret);\n });\n }\n }\n\n /**\n * Renames a variable's short token, updating every whole-word occurrence in the\n * formula. An empty name is ignored so the token never desyncs from the formula\n * (the field repopulates with the current name on the next render).\n */\n protected setVariableShortName(id: string, rawName: string): void {\n const name = rawName.trim();\n const current = this.tempValue();\n const variables = current.variables ?? [];\n const target = variables.find((v) => v.id === id);\n if (!target || !name || name === target.variable) {\n return;\n }\n const formula = target.variable\n ? (current.formula ?? '').replace(\n new RegExp(`\\\\b${escapeRegExp(target.variable)}\\\\b`, 'g'),\n name,\n )\n : (current.formula ?? '');\n this.tempValue.set({\n ...current,\n formula,\n variables: variables.map((v) => (v.id === id ? { ...v, variable: name } : v)),\n });\n }\n\n /** Toggles a list-aggregation function (sum/avg/…) on a sub-item variable. */\n protected setVariableFunction(id: string, func: CalculationFunctions): void {\n this.tempValue.update((current) => ({\n ...current,\n variables: (current.variables ?? []).map((v) => {\n if (v.id !== id) {\n return v;\n }\n if (v.function === func) {\n return {\n ...v,\n function: undefined,\n applyFunctionToCol: undefined,\n applyFunctionToLabel: undefined,\n };\n }\n return {\n ...v,\n function: func,\n applyFunctionToCol: v.formControlName,\n applyFunctionToLabel: v.label,\n };\n }),\n }));\n }\n\n /** Recomputes the picker visibility/query from the current formula and caret. */\n #syncPicker(): void {\n const element = this.formulaInputRef()?.nativeElement;\n if (!element) {\n this.closePicker();\n return;\n }\n const position = element.selectionStart ?? 0;\n this.#cursorPosition = position;\n const formula = this.tempValue().formula ?? '';\n const lastDollar = formula.slice(0, position).lastIndexOf('$');\n if (lastDollar === -1) {\n this.closePicker();\n return;\n }\n const query = formula.slice(lastDollar + 1, position);\n // Only a run of letters/digits/spaces keeps the picker open; anything else\n // (an operator, a newline) means the `$` was not a field trigger.\n if (!/^[a-zA-Z0-9 ]*$/.test(query)) {\n this.closePicker();\n return;\n }\n this.#dollarIndex = lastDollar;\n this.pickerQuery.set(query);\n this.pickerActiveIndex.set(0);\n this.pickerOpen.set(true);\n }\n\n /** Builds a calculation variable bound to a form field, carrying the list parent when present. */\n #makeVariable(input: FormColumnInputs, token: string): calculationVariableInterface {\n return {\n id: uuidv4(),\n variable: token,\n formControlName: input.formControlName,\n inputId: input.id,\n label: input.label,\n ...(input.multipleInputInEditId ? { parentInputId: input.multipleInputInEditId } : {}),\n } as calculationVariableInterface;\n }\n\n /** Next free single-letter token (a, b, c, …), skipping mathjs constants and falling back to v1, v2…. */\n #nextShortName(): string {\n const used = new Set((this.tempValue().variables ?? []).map((v) => v.variable));\n const reserved = new Set(['e', 'i']); // mathjs constants\n for (let code = 97; code <= 122; code++) {\n const char = String.fromCharCode(code);\n if (!used.has(char) && !reserved.has(char)) {\n return char;\n }\n }\n let n = 1;\n while (used.has(`v${n}`)) {\n n++;\n }\n return `v${n}`;\n }\n\n // #endregion\n}\n","<!-- View mode: read-only calculation summary -->\n@if (!isEditing()) {\n<div class=\"cfr-summary\">\n @if (!!value && !mapToData()?.id && !tableMode()) {\n <div class=\"cfr-hint\">\n <mat-icon class=\"cfr-hint__icon\" color=\"primary\">info</mat-icon>\n <span>Save the input first to enable calculated field configurations</span>\n </div>\n }\n\n <div class=\"cfr-formula-card\">\n <span class=\"cfr-section__label\">Calculation</span>\n <lib-math-preview class=\"cfr-formula-card__preview\" [expression]=\"value?.formula || ''\"\n placeholder=\"No calculation set up yet\" />\n @if (value?.decimalPlaces) {\n <div class=\"cfr-formula-card__meta\">\n <mat-icon class=\"cfr-formula-card__meta-icon\">tune</mat-icon>\n <span>Shown to {{ value?.decimalPlaces }} decimal place(s) · {{ value?.roundingMode ? roundingLabel(value?.roundingMode) : 'nearest' }}</span>\n </div>\n }\n </div>\n\n <button class=\"cfr-edit-trigger\" mat-stroked-button color=\"primary\" [disabled]=\"disabled\"\n (click)=\"startEdit()\">\n <mat-icon>edit</mat-icon>\n {{ !!value?.formula ? 'Edit calculation' : 'Set up calculation' }}\n </button>\n</div>\n}\n\n<!-- Edit mode: guided calculation builder -->\n@else {\n<mat-card appearance=\"outlined\" class=\"cfr-editor\">\n <header class=\"cfr-editor__head\">\n <h3 class=\"cfr-editor__title\">\n <mat-icon>functions</mat-icon>\n Build the calculation\n </h3>\n <p class=\"cfr-editor__subtitle\">\n Combine your form fields with operators to work out this value automatically.\n </p>\n </header>\n\n <!-- Live preview + validity -->\n <div class=\"cfr-preview\" [attr.data-state]=\"formulaStatus().kind\">\n <span class=\"cfr-section__label\">Live preview</span>\n <lib-math-preview class=\"cfr-preview__render\" [expression]=\"tempValue().formula || ''\"\n placeholder=\"Your equation will appear here\" />\n <p class=\"cfr-preview__status\">\n <mat-icon class=\"cfr-preview__status-icon\">\n {{ formulaStatus().kind === 'valid' ? 'check_circle' : formulaStatus().kind === 'invalid' ? 'error' : 'lightbulb' }}\n </mat-icon>\n <span>{{ formulaStatus().message }}</span>\n </p>\n </div>\n\n <section class=\"cfr-section\">\n <!-- Equation input + inline field-picker + operator keypad -->\n <div class=\"cfr-equation\">\n <div class=\"cfr-equation__field\">\n <mat-form-field class=\"cfr-field\" [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\"\n appearance=\"outline\">\n <mat-label>Equation</mat-label>\n <textarea #formulaInput matInput [ngModel]=\"tempValue().formula\"\n (ngModelChange)=\"onFormulaChange($event)\" (keyup)=\"onFormulaCaret()\"\n (click)=\"onFormulaCaret()\" (focus)=\"onFormulaCaret()\"\n (keydown)=\"onFormulaKeydown($event)\" (blur)=\"onFormulaBlur()\"\n placeholder=\"e.g. (a + 2) / b\" rows=\"2\" spellcheck=\"false\" autocapitalize=\"off\"\n autocomplete=\"off\"></textarea>\n <mat-hint>Type <strong>$</strong> to add a form field, then join fields with the operator keys.</mat-hint>\n </mat-form-field>\n\n @if (pickerOpen()) {\n <div class=\"cfr-picker\" role=\"listbox\" aria-label=\"Form fields\">\n <div class=\"cfr-picker__head\">Insert a field</div>\n @if (pickerResults().length === 0) {\n <div class=\"cfr-picker__empty\">No matching number fields</div>\n } @else {\n @for (item of pickerResults(); track item.id; let idx = $index) {\n <button type=\"button\" role=\"option\" class=\"cfr-picker__item\"\n [class.cfr-picker__item--active]=\"idx === pickerActiveIndex()\"\n [attr.aria-selected]=\"idx === pickerActiveIndex()\"\n (mousedown)=\"$event.preventDefault()\" (click)=\"selectField(item)\">\n <mat-icon class=\"cfr-picker__icon\">{{ item.multipleInputInEditId ? 'format_list_numbered' : 'tag' }}</mat-icon>\n <span class=\"cfr-picker__label\">{{ item.label }}</span>\n <span class=\"cfr-picker__meta\">{{ item.formControlName }}</span>\n </button>\n }\n }\n </div>\n }\n </div>\n\n <div class=\"cfr-keypad\" role=\"group\" aria-label=\"Operators\">\n @for (key of operatorKeys; track key.token) {\n <button type=\"button\" class=\"cfr-key\" [attr.aria-label]=\"key.aria\"\n (click)=\"insertToken(key.token, key.caretBack)\">\n {{ key.label }}\n </button>\n }\n </div>\n </div>\n\n <!-- Optional equation source link -->\n @if (!!tempValue().getFormulaFromAFormInput) {\n <mat-form-field class=\"cfr-field\" [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\"\n appearance=\"outline\">\n <mat-label>Equation source</mat-label>\n <mat-select [value]=\"tempValue().formControlWithFormula\"\n (selectionChange)=\"linkFormulaSource($event)\" placeholder=\"Select an input that holds a formula\">\n @for (input of formInputs(); track input.id) {\n <mat-option\n [disabled]=\"checkIfInputCanBeLinkedToCalVariable(mapToData(), input) || input.element !== 'select'\"\n [value]=\"input.formControlName\">\n {{ input.label }}\n </mat-option>\n }\n </mat-select>\n <mat-hint>Pull the equation from another input's value</mat-hint>\n </mat-form-field>\n }\n\n <!-- Bound fields legend -->\n <div class=\"cfr-variables\">\n <div class=\"cfr-block-head\">\n <span class=\"cfr-section__label\">Fields in this calculation</span>\n <span class=\"cfr-block-head__hint\">Rename a letter, or type $ above to add another</span>\n </div>\n\n @if ((tempValue().variables || []).length === 0) {\n <p class=\"cfr-variables__empty\">\n Type <strong>$</strong> in the equation above to add a form field — each becomes a short\n letter you can use in the equation.\n </p>\n } @else {\n <ul class=\"cfr-legend\">\n @for (variable of (tempValue().variables || []); track variable.id) {\n <li class=\"cfr-legend__row\">\n <div class=\"cfr-legend__main\">\n <input class=\"cfr-legend__token\" [ngModel]=\"variable.variable\"\n (ngModelChange)=\"setVariableShortName(variable.id, $event)\" aria-label=\"Short name\"\n maxlength=\"12\" spellcheck=\"false\" autocomplete=\"off\" autocapitalize=\"off\">\n <mat-icon class=\"cfr-legend__arrow\">arrow_right_alt</mat-icon>\n <button type=\"button\" class=\"cfr-legend__field\"\n [attr.aria-label]=\"'Insert ' + variable.label + ' into the equation'\"\n (click)=\"appendVariableToFormula(variable.variable)\">\n {{ variable.label }}\n </button>\n <button type=\"button\" class=\"cfr-legend__remove\"\n [attr.aria-label]=\"'Remove ' + variable.variable\"\n (click)=\"removeVariable(variable.id)\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n @if (variable.parentInputId) {\n <div class=\"cfr-legend__fns\" role=\"group\" aria-label=\"Combine list values with\">\n <span class=\"cfr-legend__fns-label\" aria-hidden=\"true\">ƒ</span>\n @for (func of allCalculationFunction(); track func) {\n <button type=\"button\" class=\"cfr-legend__fn\"\n [class.cfr-legend__fn--active]=\"variable.function === func\"\n (click)=\"setVariableFunction(variable.id, func)\">\n {{ func }}\n </button>\n }\n </div>\n }\n </li>\n }\n </ul>\n }\n </div>\n\n <!-- Result formatting -->\n <div class=\"cfr-rounding\">\n <div class=\"cfr-block-head\">\n <span class=\"cfr-section__label\">Result formatting</span>\n <span class=\"cfr-block-head__hint\">Optional — how the answer is rounded</span>\n </div>\n\n <div class=\"cfr-rounding__row\">\n <mat-form-field class=\"cfr-field cfr-rounding__decimals\" [subscriptSizing]=\"'dynamic'\"\n [floatLabel]=\"'always'\" appearance=\"outline\">\n <mat-label>Decimal places</mat-label>\n <input matInput [ngModel]=\"tempValue().decimalPlaces\"\n (ngModelChange)=\"setDecimalPlaces($event)\" placeholder=\"0\" type=\"number\" min=\"0\">\n </mat-form-field>\n\n @if (tempValue().decimalPlaces) {\n <div class=\"cfr-rounding__mode\">\n <label class=\"cfr-section__label\">Rounding</label>\n <mat-chip-listbox aria-label=\"Rounding method\">\n @for (type of roundingType; track type.value) {\n <mat-chip-option (click)=\"setRoundingMode(type.value)\"\n [selected]=\"tempValue().roundingMode === type.value\">\n {{ type.label }}\n </mat-chip-option>\n }\n </mat-chip-listbox>\n </div>\n }\n </div>\n </div>\n </section>\n\n <div class=\"cfr-editor__actions\">\n <button mat-button (click)=\"cancelEdit()\">Cancel</button>\n <button mat-flat-button color=\"primary\" [disabled]=\"formulaStatus().kind === 'invalid'\"\n (click)=\"saveEdit()\">\n Save calculation\n </button>\n </div>\n</mat-card>\n}\n\n<!-- Disabled overlay -->\n<ng-template cdkConnectedOverlay [cdkConnectedOverlayOpen]=\"disabled\">\n <div class=\"cfr-disabled-overlay\"></div>\n</ng-template>\n"],"names":["uuidv4","i4","i5","i6","i7","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;;;;;;;;AAQG;AACG,SAAU,iBAAiB,CAAC,UAAkB,EAAA;AAClD,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,EAAE;IACjC,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;IACnC;AACA,IAAA,IAAI;AACF,QAAA,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;IACrD;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,EAAE;IACrD;AACF;AAEA;AACA,SAAS,eAAe,CAAC,KAAc,EAAA;AACrC,IAAA,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,EAAE;AACvD,IAAA,IAAI,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAClC,QAAA,OAAO,qEAAqE;IAC9E;AACA,IAAA,IAAI,sBAAsB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AACpC,QAAA,OAAO,0EAA0E;IACnF;AACA,IAAA,IAAI,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC/B,QAAA,OAAO,uEAAuE;IAChF;AACA,IAAA,IAAI,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;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,EAAA,CAAA,CAAA;;4FAQL,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAzBzC,SAAS;+BACE,4BAA4B,EAAA,eAAA,EAGrB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,OAAA,EAChC;wBACP,YAAY;wBACZ,WAAW;wBACX,oBAAoB;wBACpB,aAAa;wBACb,kBAAkB;wBAClB,cAAc;wBACd,eAAe;wBACf,aAAa;wBACb,aAAa;wBACb,eAAe;wBACf,cAAc;qBACf,EAAA,SAAA,EACU,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,6BAA+B,EAAE,CAAC,EAAA,IAAA,EACnF;AACJ,wBAAA,OAAO,EAAE,4BAA4B;AACrC,wBAAA,yBAAyB,EAAE,aAAa;AACzC,qBAAA,EAAA,QAAA,EAAA,s7SAAA,EAAA,MAAA,EAAA,CAAA,o5RAAA,CAAA,EAAA;;sBAQA;;sBACA;;sBACA;6eA6D4C,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA;sBAkE1D;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-chip-options-creator-editor.component-L1kPy15K.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/chip-options-creator-editor/chip-options-creator-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/chip-options-creator-editor/chip-options-creator-editor.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { COMMA, ENTER } from '@angular/cdk/keycodes';\nimport { MatChipEditedEvent, MatChipInputEvent, MatChipsModule } from '@angular/material/chips';\nimport { MatIconModule } from '@angular/material/icon';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\n\n/**\n * Internal chip-options creator editor: the user types free-text tokens that\n * become removable, editable chips; the resulting `string[]` is emitted.\n *\n * Rendered by `t-dynamic-data-edit`'s non-control branch (it is NOT a\n * MatFormFieldControl), which already supplies the field label, hint, and\n * validation errors — so this component owns only the chip grid and its empty\n * state.\n */\n@Component({\n selector: 'lib-chip-options-creator-editor',\n imports: [MatChipsModule, MatIconModule, EmptyStateComponent],\n templateUrl: './chip-options-creator-editor.component.html',\n styleUrl: './chip-options-creator-editor.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n 'class': 'lib-chip-options-creator-editor',\n '[attr.id]': 'id()',\n },\n})\nexport class ChipOptionsCreatorEditorComponent {\n /** Optional id attribute supplied by the parent editor. */\n readonly id = input<string | undefined>(undefined);\n /** Disables chip entry/edit/remove. */\n readonly disabled = input<boolean>(false);\n /** Whether a non-empty value is required (kept on the contract). */\n readonly required = input<boolean>(false);\n /** External validation errors (surfaced by the parent). */\n readonly errors = input<IConfigElementError[] | undefined>([]);\n /** The chip values to render. */\n readonly value = input<string[] | undefined>(undefined);\n /** Placeholder for the new-chip input. */\n readonly placeholder = input<string>('');\n\n /** Emits the full chip list whenever it changes. */\n readonly valueChange = output<string[] | undefined>();\n\n protected readonly separatorKeysCodes = [ENTER, COMMA] as const;\n\n /** Local working copy of the chip list; mirrors the `value` input. */\n readonly #internalValue = signal<readonly string[]>([]);\n /** Read-only accessor used by the template. */\n protected readonly currentValue = this.#internalValue.asReadonly();\n protected readonly isEmpty = computed(() => this.#internalValue().length === 0);\n\n readonly #announcer = inject(LiveAnnouncer);\n\n constructor() {\n // The parent drives the value declaratively via [value].\n effect(() => {\n this.#internalValue.set(this.value() ?? []);\n });\n }\n\n protected add(event: MatChipInputEvent): void {\n const value = (event.value || '').trim();\n event.chipInput?.clear();\n if (!value) {\n return;\n }\n const current = this.#internalValue();\n if (current.includes(value)) {\n this.#announcer.announce(`value ${value} already exists`);\n return;\n }\n this.#commit([...current, value]);\n }\n\n protected edit(segment: string, event: MatChipEditedEvent): void {\n const newValue = event.value.trim();\n if (!newValue) {\n this.remove(segment);\n return;\n }\n this.#commit(this.#internalValue().map((s) => (s === segment ? newValue : s)));\n }\n\n protected remove(segment: string): void {\n const current = this.#internalValue();\n if (!current.includes(segment)) {\n return;\n }\n this.#announcer.announce(`Removed ${segment}`);\n this.#commit(current.filter((s) => s !== segment));\n }\n\n #commit(next: readonly string[]): void {\n const snapshot = [...next];\n this.#internalValue.set(snapshot);\n this.valueChange.emit(snapshot);\n }\n}\n","@if (isEmpty()) {\n<lib-empty-state icon=\"label_off\" message=\"No options yet — type below to add one\" />\n}\n\n<mat-chip-grid\n #chipGrid\n class=\"lib-chip-options-creator-editor__grid\"\n [disabled]=\"disabled()\"\n aria-label=\"Chip options\">\n @for (segment of currentValue(); track $index) {\n <mat-chip-row\n class=\"lib-chip-options-creator-editor__chip\"\n [editable]=\"true\"\n [aria-description]=\"'press enter to edit ' + segment\"\n (edited)=\"edit(segment, $event)\"\n (removed)=\"remove(segment)\">\n {{ segment }}\n <button matChipRemove [attr.aria-label]=\"'remove ' + segment\">\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n <input\n class=\"lib-chip-options-creator-editor__input\"\n [placeholder]=\"placeholder() || 'New selection...'\"\n [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"add($event)\" />\n</mat-chip-grid>\n"],"names":["i1"],"mappings":";;;;;;;;;;AAkBA;;;;;;;;AAQG;MAaU,iCAAiC,CAAA;;AAoBnC,IAAA,cAAc;AAKd,IAAA,UAAU;AAEnB,IAAA,WAAA,GAAA;;AAzBS,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAqB,SAAS,yEAAC;;AAEz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A,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAUjD,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAZ7C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iCAAiC,WAClC,CAAC,cAAc,EAAE,aAAa,EAAE,mBAAmB,CAAC,EAAA,eAAA,EAG5C,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,OAAO,EAAE,iCAAiC;AAC1C,wBAAA,WAAW,EAAE,MAAM;AACpB,qBAAA,EAAA,QAAA,EAAA,wgCAAA,EAAA,MAAA,EAAA,CAAA,4pDAAA,CAAA,EAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-config-mscoa-additional-inputs.component-CU6Cp-oK.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/config-mscoa-additional-inputs/config-mscoa-additional-inputs.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/config-mscoa-additional-inputs/config-mscoa-additional-inputs.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Input,\n ViewEncapsulation,\n computed,\n inject,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgControl } from '@angular/forms';\nimport { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nimport { MatListModule } from '@angular/material/list';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { Subject, catchError, of, take, tap, type Observable } from 'rxjs';\n\nimport type { FormColumnInputs, IGetTreeResponse } from 'ngx-t-forms-types';\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\n\n/**\n * A configured form input paired with the MSCOA account-segment it links to.\n *\n * `segment` is `undefined` when the user selects \"None\" (i.e. the input is not\n * bound to any account segment).\n */\nexport interface ConfiguredMscoaInput extends FormColumnInputs {\n /** Selected account-segment key. `undefined` when the user picks \"None\". */\n segment: string | undefined;\n}\n\n/** A selectable account-segment option (plus the synthetic \"None\" entry). */\ninterface SegmentOption {\n readonly value: string | undefined;\n readonly label: string;\n}\n\n/**\n * Internal editor that links each configured form input to an MSCOA\n * account-segment, implementing `MatFormFieldControl<ConfiguredMscoaInput[]>`\n * for the dynamic-data-edit configuration surface.\n *\n * Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,\n * hint, and validation errors — so this component owns only the per-input\n * segment selectors and the empty-state hint.\n *\n * NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /\n * `required` / `placeholder` / `id` members, `@Input()` decorators, the\n * `focused` / `touched` / `stateChanges` members, and the `useExisting`\n * provider. These are framework wiring, not defects — the CLAUDE.md bans on\n * `@Input()` / `useExisting` do not apply to MatFormFieldControl integration.\n */\n@Component({\n selector: 'lib-config-mscoa-additional-inputs',\n imports: [\n MatListModule,\n MatToolbarModule,\n MatFormFieldModule,\n MatSelectModule,\n EmptyStateComponent,\n ],\n templateUrl: './config-mscoa-additional-inputs.component.html',\n styleUrls: ['./config-mscoa-additional-inputs.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n { provide: MatFormFieldControl, useExisting: ConfigMscoaAdditionalInputsComponent },\n ],\n host: {\n 'class': 'lib-config-mscoa-additional-inputs',\n '[id]': 'id',\n '[attr.aria-describedby]': 'describedBy',\n },\n})\nexport class ConfigMscoaAdditionalInputsComponent\n implements MatFormFieldControl<ConfiguredMscoaInput[]>\n{\n static nextId = 0;\n\n // ---- MatFormFieldControl wiring (framework-mandated plain members) -------\n\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'lib-config-mscoa-additional-inputs';\n\n id = `app-config-mscoa-additional-inputs-${ConfigMscoaAdditionalInputsComponent.nextId++}`;\n placeholder = '';\n focused = false;\n touched = false;\n describedBy = '';\n autofilled: boolean | undefined = undefined;\n userAriaDescribedBy: string | undefined = undefined;\n disableAutomaticLabeling: boolean | undefined = undefined;\n\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n readonly #destroyRef = inject(DestroyRef);\n\n // ---- Public input/output contract ---------------------------------------\n\n /** Whether all segment selectors are inert. */\n @Input() disabled = false;\n\n /** Whether a value is required (drives the MFC error state). */\n @Input() required = false;\n\n /** Validation errors surfaced by the parent for error-state derivation. */\n @Input() errors: IConfigElementError[] | undefined = [];\n\n /** Data context; the add-input affordance is gated on `mapToData?.id`. */\n @Input() mapToData: FormColumnInputs | undefined = undefined;\n\n /**\n * One-shot stream of the MSCOA tree. The first emitted response's\n * `accountTreeKeys` populate the per-input segment options; later\n * assignments are ignored (the stream is consumed once).\n */\n @Input() set getMscoaTree(options$: Observable<IGetTreeResponse | undefined>) {\n if (!options$ || this.#mscoaInitiated) {\n return;\n }\n this.#mscoaInitiated = true;\n options$\n .pipe(\n take(1),\n tap((options) => this.#accountTreeKeys.set(options?.accountTreeKeys ?? [])),\n catchError(() => of(undefined)),\n takeUntilDestroyed(this.#destroyRef),\n )\n .subscribe();\n }\n\n /** Emits the full configured-input list whenever a segment changes. */\n readonly valueChanged = output<ConfiguredMscoaInput[]>();\n\n #mscoaInitiated = false;\n readonly #accountTreeKeys = signal<string[]>([]);\n readonly #value = signal<ConfiguredMscoaInput[]>([]);\n\n /** Currently hovered list row index, for hover affordances. */\n protected readonly hovered = signal<number | null>(null);\n\n /**\n * Segment options offered per input: every account-tree key plus a trailing\n * synthetic \"None\" entry that clears the binding.\n */\n protected readonly limitInputTo = computed<SegmentOption[]>(() => [\n ...this.#accountTreeKeys().map((key) => ({ value: key as string | undefined, label: key })),\n { value: undefined, label: 'None' },\n ]);\n\n /**\n * Whether the empty-state hint may render.\n *\n * A plain getter (not a `computed()`) because `mapToData` is a framework-style\n * mutable `@Input` rather than a signal — OnPush re-evaluates this binding\n * each change-detection pass.\n */\n protected get canAddInputs(): boolean {\n return !!this.mapToData?.id;\n }\n\n /** Configured inputs to render. */\n protected readonly inputs = this.#value.asReadonly();\n\n /** Current MatFormFieldControl value (the configured-input list). */\n @Input()\n get value(): ConfiguredMscoaInput[] {\n return this.#value();\n }\n set value(val: ConfiguredMscoaInput[]) {\n this.#value.set(val ?? []);\n this.stateChanges.next();\n }\n\n // ---- MatFormFieldControl framework getters ------------------------------\n\n get empty(): boolean {\n return this.#value().length === 0;\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get errorState(): boolean {\n const requiredUnset = this.empty && this.required;\n const ngControlError = this.ngControl?.errors != null;\n const externalError = (this.errors?.length ?? 0) > 0 && this.touched;\n return requiredUnset || ngControlError || externalError;\n }\n\n setDescribedByIds(ids: string[]): void {\n this.describedBy = ids.join(' ');\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n this.markAsTouched();\n this.stateChanges.next();\n }\n\n onTouched: () => void = () => {};\n\n markAsTouched(): void {\n if (!this.touched) {\n this.touched = true;\n this.onTouched();\n this.stateChanges.next();\n }\n }\n\n // ---- Behaviour ----------------------------------------------------------\n\n /**\n * Assigns the chosen account-segment to the input at `index` and emits the\n * updated list immediately. Selecting \"None\" (`undefined`) clears the binding.\n */\n inputSegmentChanged(\n event: { detail?: { value: string }; value?: string },\n index: number,\n ): void {\n const detailValue = event.detail?.value ?? event.value;\n const current = this.#value();\n const item = current[index];\n if (!item) {\n return;\n }\n const next = current.map((input, i) =>\n i === index\n ? { ...input, segment: detailValue === 'None' ? undefined : detailValue }\n : input,\n );\n this.#value.set(next);\n this.markAsTouched();\n this.stateChanges.next();\n this.valueChanged.emit(next);\n }\n}\n","@if (inputs().length > 0) {\n <mat-list class=\"lib-config-mscoa-additional-inputs__list\">\n <mat-toolbar class=\"lib-config-mscoa-additional-inputs__heading\">\n Additional inputs configuration\n </mat-toolbar>\n @for (input of inputs(); track input.id; let i = $index) {\n <mat-form-field\n class=\"lib-config-mscoa-additional-inputs__row\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n (mouseover)=\"hovered.set(i)\"\n (mouseleave)=\"hovered.set(null)\">\n <mat-label>{{ input.label }}</mat-label>\n <mat-select\n matNativeControl\n [disabled]=\"disabled\"\n [value]=\"input.segment\"\n placeholder=\"select segment\"\n (selectionChange)=\"inputSegmentChanged($event, i)\">\n @for (segment of limitInputTo(); track segment.label) {\n <mat-option [value]=\"segment.value\">{{ segment.label }}</mat-option>\n }\n </mat-select>\n <mat-hint>Link formula to an input value</mat-hint>\n </mat-form-field>\n }\n </mat-list>\n} @else if (canAddInputs) {\n <lib-empty-state\n icon=\"info\"\n message=\"No input configuration available.\" />\n}\n"],"names":["i1","i3","i4"],"mappings":";;;;;;;;;;;;;;;AAwCA;;;;;;;;;;;;;;AAcG;MAuBU,oCAAoC,CAAA;AAtBjD,IAAA,WAAA,GAAA;;;AA8BW,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QAClC,IAAA,CAAA,WAAW,GAAG,oCAAoC;AAE3D,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,mCAAA,EAAsC,oCAAoC,CAAC,MAAM,EAAE,EAAE;QAC1F,IAAA,CAAA,WAAW,GAAG,EAAE;QAChB,IAAA,CAAA,OAAO,GAAG,KAAK;QACf,IAAA,CAAA,OAAO,GAAG,KAAK;QACf,IAAA,CAAA,WAAW,GAAG,EAAE;QAChB,IAAA,CAAA,UAAU,GAAwB,SAAS;QAC3C,IAAA,CAAA,mBAAmB,GAAuB,SAAS;QACnD,IAAA,CAAA,wBAAwB,GAAwB,SAAS;AAEhD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAE7D,QAAA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AAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAeV,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAtBhD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oCAAoC,EAAA,OAAA,EACrC;wBACP,aAAa;wBACb,gBAAgB;wBAChB,kBAAkB;wBAClB,eAAe;wBACf,mBAAmB;AACpB,qBAAA,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B;AACT,wBAAA,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,sCAAsC,EAAE;qBACpF,EAAA,IAAA,EACK;AACJ,wBAAA,OAAO,EAAE,oCAAoC;AAC7C,wBAAA,MAAM,EAAE,IAAI;AACZ,wBAAA,yBAAyB,EAAE,aAAa;AACzC,qBAAA,EAAA,QAAA,EAAA,0sCAAA,EAAA,MAAA,EAAA,CAAA,8KAAA,CAAA,EAAA;;sBA6BA;;sBAGA;;sBAGA;;sBAGA;;sBAOA;;sBAiDA;;;;;"}
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, input, output, inject, ElementRef, computed, Input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { NgControl } from '@angular/forms';
|
|
4
|
-
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
5
|
-
import { Subject } from 'rxjs';
|
|
6
|
-
import * as i1 from '@angular/material/button';
|
|
7
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
8
|
-
import * as i3 from '@angular/material/card';
|
|
9
|
-
import { MatCardModule } from '@angular/material/card';
|
|
10
|
-
import * as i3$1 from '@angular/material/icon';
|
|
11
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
12
|
-
import * as i6 from '@angular/material/list';
|
|
13
|
-
import { MatListModule } from '@angular/material/list';
|
|
14
|
-
import * as i5 from '@angular/material/tooltip';
|
|
15
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
|
-
import { DataSources } from 'ngx-t-forms-types';
|
|
17
|
-
import { E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-DQ_h-jPF.mjs';
|
|
18
|
-
import { MatChipListEditorComponent } from './ngx-t-forms-mat-chip-list-editor.component-Cu-KiAeY.mjs';
|
|
19
|
-
import { PipelineGeneratorComponent } from './ngx-t-forms-pipeline-generator.component-BJQ-KnmU.mjs';
|
|
20
|
-
import { RequiredInputsComponent } from './ngx-t-forms-required-inputs.component-C-E3fQu6.mjs';
|
|
21
|
-
import { RestApiCallSetupComponent } from './ngx-t-forms-rest-api-call-setup.component-D3sa7sNg.mjs';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Internal editor element for configuring a report's data sources (API calls and
|
|
25
|
-
* MongoDB pipelines). It is a real `MatFormFieldControl`, rendered by
|
|
26
|
-
* `t-dynamic-data-edit` inside a `<mat-form-field>` — so the parent owns the
|
|
27
|
-
* surrounding label, hint, and validation errors, and this component owns only
|
|
28
|
-
* the source list, the inline editor card, and the add affordance.
|
|
29
|
-
*
|
|
30
|
-
* NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /
|
|
31
|
-
* `required` / `placeholder` / `id` members, `@Input()` decorators, the
|
|
32
|
-
* `focused` / `touched` / `stateChanges` members, and the `useExisting`
|
|
33
|
-
* provider. These are framework wiring, not defects — the CLAUDE.md bans on
|
|
34
|
-
* `@Input()` / `useExisting` do not apply to MatFormFieldControl integration.
|
|
35
|
-
*/
|
|
36
|
-
class DataSourcePickerComponent {
|
|
37
|
-
constructor() {
|
|
38
|
-
/** Emits whenever a piece of `MatFormFieldControl` state changes. */
|
|
39
|
-
this.stateChanges = new Subject();
|
|
40
|
-
this.controlType = 'lib-data-source-picker';
|
|
41
|
-
this.id = `lib-data-source-picker-${DataSourcePickerComponent.nextId++}`;
|
|
42
|
-
this.placeholder = '';
|
|
43
|
-
this.focused = false;
|
|
44
|
-
this.touched = false;
|
|
45
|
-
this.required = false;
|
|
46
|
-
this.describedBy = '';
|
|
47
|
-
this.autofilled = false;
|
|
48
|
-
this.userAriaDescribedBy = undefined;
|
|
49
|
-
this.disableAutomaticLabeling = undefined;
|
|
50
|
-
/** Validation errors surfaced by the parent for error-state derivation. */
|
|
51
|
-
this.errors = [];
|
|
52
|
-
this.#disabled = false;
|
|
53
|
-
// Mirror of the plain MFC `value` member, so the template + computeds react.
|
|
54
|
-
this.#value = signal(undefined, ...(ngDevMode ? [{ debugName: "#value" }] : /* istanbul ignore next */ []));
|
|
55
|
-
// Mirror of the plain `editorConfig` member, so the template reacts.
|
|
56
|
-
this.#editorConfig = signal(undefined, ...(ngDevMode ? [{ debugName: "#editorConfig" }] : /* istanbul ignore next */ []));
|
|
57
|
-
/** All available form inputs the user can map a required input to. */
|
|
58
|
-
this.formInputs = input([], ...(ngDevMode ? [{ debugName: "formInputs" }] : /* istanbul ignore next */ []));
|
|
59
|
-
/** Emits the mutated data-source list whenever the user adds or removes a source. */
|
|
60
|
-
this.valueChange = output();
|
|
61
|
-
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
62
|
-
this.#elementRef = inject(ElementRef);
|
|
63
|
-
/** Source-type enum, exposed to the template. */
|
|
64
|
-
this.dataSources = DataSources;
|
|
65
|
-
/** The selectable source types in the chip selector. */
|
|
66
|
-
this.dataSourceOptions = [
|
|
67
|
-
{ label: 'API', value: DataSources.Api },
|
|
68
|
-
{ label: 'MongoDB', value: DataSources.MongoDb },
|
|
69
|
-
];
|
|
70
|
-
/** The in-edit draft, or `undefined` when the editor card is closed. */
|
|
71
|
-
this.draft = signal(undefined, ...(ngDevMode ? [{ debugName: "draft" }] : /* istanbul ignore next */ []));
|
|
72
|
-
/** Decorated rows for the configured-source list. */
|
|
73
|
-
this.rows = computed(() => (this.#value() ?? []).map((source, index) => ({
|
|
74
|
-
source,
|
|
75
|
-
name: this.#name(source, index),
|
|
76
|
-
icon: source.source === DataSources.Api ? 'api' : 'storage',
|
|
77
|
-
endpoint: this.#endpoint(source),
|
|
78
|
-
isApi: source.source === DataSources.Api,
|
|
79
|
-
})), ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
80
|
-
/** Whether any data source is configured. */
|
|
81
|
-
this.hasSources = computed(() => (this.#value() ?? []).length > 0, ...(ngDevMode ? [{ debugName: "hasSources" }] : /* istanbul ignore next */ []));
|
|
82
|
-
/** The `minimumInputRequired` list of the draft's API config, or `undefined`. */
|
|
83
|
-
this.draftMinimumInputRequired = computed(() => {
|
|
84
|
-
const config = this.draft()?.config;
|
|
85
|
-
if (!config || !this.#isApiConfig(config)) {
|
|
86
|
-
return undefined;
|
|
87
|
-
}
|
|
88
|
-
return config.backEndConfig?.minimumInputRequired;
|
|
89
|
-
}, ...(ngDevMode ? [{ debugName: "draftMinimumInputRequired" }] : /* istanbul ignore next */ []));
|
|
90
|
-
this.onTouched = () => { };
|
|
91
|
-
}
|
|
92
|
-
static { this.nextId = 0; }
|
|
93
|
-
#disabled;
|
|
94
|
-
/** Whether the control is inert. */
|
|
95
|
-
get disabled() {
|
|
96
|
-
return this.#disabled;
|
|
97
|
-
}
|
|
98
|
-
set disabled(value) {
|
|
99
|
-
this.#disabled = value;
|
|
100
|
-
this.stateChanges.next();
|
|
101
|
-
}
|
|
102
|
-
// Mirror of the plain MFC `value` member, so the template + computeds react.
|
|
103
|
-
#value;
|
|
104
|
-
/** Current list of configured data sources. */
|
|
105
|
-
get value() {
|
|
106
|
-
return this.#value();
|
|
107
|
-
}
|
|
108
|
-
set value(value) {
|
|
109
|
-
if (this.#value() === value) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
this.#value.set(value);
|
|
113
|
-
this.stateChanges.next();
|
|
114
|
-
}
|
|
115
|
-
// Mirror of the plain `editorConfig` member, so the template reacts.
|
|
116
|
-
#editorConfig;
|
|
117
|
-
/** Editor configuration supplying postman / workflow option providers. */
|
|
118
|
-
get editorConfig() {
|
|
119
|
-
return this.#editorConfig();
|
|
120
|
-
}
|
|
121
|
-
set editorConfig(config) {
|
|
122
|
-
this.#editorConfig.set(config);
|
|
123
|
-
}
|
|
124
|
-
#elementRef;
|
|
125
|
-
// ---- MatFormFieldControl getters (read during the framework's CD) --------
|
|
126
|
-
get empty() {
|
|
127
|
-
return (this.#value() ?? []).length === 0;
|
|
128
|
-
}
|
|
129
|
-
get shouldLabelFloat() {
|
|
130
|
-
return this.focused || !this.empty;
|
|
131
|
-
}
|
|
132
|
-
get errorState() {
|
|
133
|
-
const requiredUnset = this.empty && this.required;
|
|
134
|
-
const ngControlError = this.ngControl?.errors != null;
|
|
135
|
-
const externalError = (this.errors?.length ?? 0) > 0 && this.touched;
|
|
136
|
-
return requiredUnset || ngControlError || externalError;
|
|
137
|
-
}
|
|
138
|
-
setDescribedByIds(ids) {
|
|
139
|
-
this.describedBy = ids.join(' ');
|
|
140
|
-
const el = this.#elementRef.nativeElement;
|
|
141
|
-
const control = el.querySelector('.lib-data-source-picker__list');
|
|
142
|
-
control?.setAttribute('aria-describedby', this.describedBy);
|
|
143
|
-
this.stateChanges.next();
|
|
144
|
-
}
|
|
145
|
-
onContainerClick() {
|
|
146
|
-
this.markAsTouched();
|
|
147
|
-
if (!this.focused) {
|
|
148
|
-
this.focused = true;
|
|
149
|
-
}
|
|
150
|
-
this.stateChanges.next();
|
|
151
|
-
}
|
|
152
|
-
markAsTouched() {
|
|
153
|
-
if (!this.touched) {
|
|
154
|
-
this.touched = true;
|
|
155
|
-
this.onTouched();
|
|
156
|
-
this.stateChanges.next();
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
// ---- Draft editing -------------------------------------------------------
|
|
160
|
-
/** Open the editor card with an empty draft. */
|
|
161
|
-
startEditing() {
|
|
162
|
-
this.draft.set({});
|
|
163
|
-
}
|
|
164
|
-
/** Discard the draft and close the editor card. */
|
|
165
|
-
cancelEditing() {
|
|
166
|
-
this.draft.set(undefined);
|
|
167
|
-
}
|
|
168
|
-
/** Set the draft's source type. Child chip editor emits an unknown payload. */
|
|
169
|
-
sourceTypeChanged(source) {
|
|
170
|
-
this.draft.update((current) => current ? { ...current, source: source } : current);
|
|
171
|
-
}
|
|
172
|
-
/** Set the draft's source config (API setup or pipeline). */
|
|
173
|
-
sourceConfigChanged(config) {
|
|
174
|
-
this.draft.update((current) => (current ? { ...current, config } : current));
|
|
175
|
-
}
|
|
176
|
-
/** Merge the required-input list into the draft's API config. */
|
|
177
|
-
minimumInputRequiredValueChanged(value) {
|
|
178
|
-
this.draft.update((current) => {
|
|
179
|
-
if (!current?.config || !this.#isApiConfig(current.config)) {
|
|
180
|
-
return current;
|
|
181
|
-
}
|
|
182
|
-
const config = {
|
|
183
|
-
...current.config,
|
|
184
|
-
backEndConfig: { ...current.config.backEndConfig, minimumInputRequired: value },
|
|
185
|
-
};
|
|
186
|
-
return { ...current, config };
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
/** Commit the draft as a new source (assigning a fresh id) and emit. */
|
|
190
|
-
saveNewSource() {
|
|
191
|
-
const current = this.draft();
|
|
192
|
-
if (!current) {
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
const data = { ...current, id: crypto.randomUUID() };
|
|
196
|
-
const next = [...(this.#value() ?? []), data];
|
|
197
|
-
this.value = next;
|
|
198
|
-
this.draft.set(undefined);
|
|
199
|
-
this.markAsTouched();
|
|
200
|
-
this.valueChange.emit(next);
|
|
201
|
-
}
|
|
202
|
-
/** Remove a configured source by id and emit. */
|
|
203
|
-
removeSource(source) {
|
|
204
|
-
const current = this.#value();
|
|
205
|
-
if (!current) {
|
|
206
|
-
return;
|
|
207
|
-
}
|
|
208
|
-
const next = current.filter((item) => item.id !== source.id);
|
|
209
|
-
this.value = next;
|
|
210
|
-
this.markAsTouched();
|
|
211
|
-
this.valueChange.emit(next);
|
|
212
|
-
}
|
|
213
|
-
#name(value, index) {
|
|
214
|
-
if (this.#isApiConfig(value.config) && value.config.name) {
|
|
215
|
-
return value.config.name;
|
|
216
|
-
}
|
|
217
|
-
return value.source === DataSources.Api ? `API ${index + 1}` : `MongoDB ${index + 1}`;
|
|
218
|
-
}
|
|
219
|
-
#endpoint(value) {
|
|
220
|
-
if (this.#isApiConfig(value.config)) {
|
|
221
|
-
return value.config.httpEndPoint ?? '';
|
|
222
|
-
}
|
|
223
|
-
return value.config.workflowId ?? '';
|
|
224
|
-
}
|
|
225
|
-
#isApiConfig(config) {
|
|
226
|
-
return config?.source === DataSources.Api;
|
|
227
|
-
}
|
|
228
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DataSourcePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
229
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DataSourcePickerComponent, isStandalone: true, selector: "lib-data-source-picker", inputs: { errors: { classPropertyName: "errors", publicName: "errors", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, editorConfig: { classPropertyName: "editorConfig", publicName: "editorConfig", isSignal: false, isRequired: false, transformFunction: null }, formInputs: { classPropertyName: "formInputs", publicName: "formInputs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.id": "id", "class.lib-data-source-picker--focused": "focused", "class.lib-data-source-picker--disabled": "disabled" }, classAttribute: "lib-data-source-picker" }, providers: [{ provide: MatFormFieldControl, useExisting: DataSourcePickerComponent }], ngImport: i0, template: "<div class=\"lib-data-source-picker__list\">\n @if (hasSources()) {\n <mat-list class=\"lib-data-source-picker__sources\">\n @for (row of rows(); track row.source.id) {\n <mat-list-item\n class=\"lib-data-source-picker__source\"\n matTooltipPosition=\"before\"\n [matTooltip]=\"row.source.source + ' ' + row.endpoint\">\n <mat-icon\n matListItemIcon\n class=\"lib-data-source-picker__icon\"\n [class.lib-data-source-picker__icon--api]=\"row.isApi\">\n {{ row.icon }}\n </mat-icon>\n <span matListItemTitle class=\"lib-data-source-picker__name\">{{ row.name }}</span>\n <span matListItemLine class=\"lib-data-source-picker__endpoint\">{{ row.endpoint }}</span>\n <button\n matListItemMeta\n mat-icon-button\n type=\"button\"\n [attr.aria-label]=\"'Remove ' + row.name\"\n [disabled]=\"disabled\"\n (click)=\"removeSource(row.source)\">\n <mat-icon>delete</mat-icon>\n </button>\n </mat-list-item>\n }\n </mat-list>\n } @else {\n <lib-empty-state icon=\"storage\" message=\"No data sources configured. Add one to get started.\" />\n }\n</div>\n\n@if (draft(); as draft) {\n <mat-card appearance=\"outlined\" class=\"lib-data-source-picker__editor\">\n <mat-card-content>\n <label [attr.for]=\"id + '-type'\" class=\"lib-data-source-picker__label\">Select source type</label>\n <lib-mat-chip-list-editor\n [id]=\"id + '-type'\"\n [value]=\"draft.source\"\n [options]=\"dataSourceOptions\"\n (valueChange)=\"sourceTypeChanged($event)\" />\n\n @if (draft.source !== undefined) {\n @switch (draft.source) {\n @case (dataSources.Api) {\n <label [attr.for]=\"id + '-api'\" class=\"lib-data-source-picker__label\">Select API</label>\n <lib-rest-api-call-setup\n [id]=\"id + '-api'\"\n [postmanCollectionConfig]=\"editorConfig?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"editorConfig?.httpGetDataFunction\"\n [value]=\"$any(draft.config)\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n\n @if (draftMinimumInputRequired(); as minimumInputRequired) {\n <lib-required-inputs\n [id]=\"id + '-required-inputs'\"\n [formInputs]=\"formInputs() || []\"\n [value]=\"minimumInputRequired\"\n [errors]=\"[]\"\n (valueChanged)=\"minimumInputRequiredValueChanged($event)\" />\n }\n }\n @case (dataSources.MongoDb) {\n <label [attr.for]=\"id + '-pipeline'\" class=\"lib-data-source-picker__label\">Add a MongoDB pipeline</label>\n <lib-pipeline-generator\n [id]=\"id + '-pipeline'\"\n [value]=\"$any(draft.config)\"\n [getWorkflowOptions]=\"editorConfig?.getWorkflowOptions\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n }\n }\n }\n </mat-card-content>\n\n <mat-card-actions class=\"lib-data-source-picker__actions\">\n <button mat-flat-button color=\"primary\" type=\"button\" (click)=\"saveNewSource()\">Save source</button>\n <span class=\"lib-data-source-picker__spacer\"></span>\n <button mat-button color=\"warn\" type=\"button\" (click)=\"cancelEditing()\">Cancel</button>\n </mat-card-actions>\n </mat-card>\n} @else {\n <button\n mat-stroked-button\n color=\"primary\"\n type=\"button\"\n class=\"lib-data-source-picker__add\"\n [disabled]=\"disabled\"\n (click)=\"startEditing()\">\n <mat-icon>add</mat-icon>\n Add data source\n </button>\n}\n", styles: [":host{display:block}.lib-data-source-picker__list{display:block}.lib-data-source-picker__sources{padding:0}.lib-data-source-picker__source{border-radius:var(--lib-forms-radius-sm, 8px)}.lib-data-source-picker__icon{color:var(--lib-forms-on-surface-variant)}.lib-data-source-picker__icon--api{color:var(--lib-forms-primary)}.lib-data-source-picker__name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lib-data-source-picker__endpoint{color:var(--lib-forms-on-surface-variant);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lib-data-source-picker__editor{margin-top:1.5rem;background:var(--lib-forms-surface)}.lib-data-source-picker__label{display:block;margin-top:.75rem;margin-bottom:.5rem;font-size:.625rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--lib-forms-on-surface-variant)}.lib-data-source-picker__actions{display:flex;align-items:center;margin-top:1.5rem}.lib-data-source-picker__spacer{flex:1 1 auto}.lib-data-source-picker__add{width:100%;margin-top:1.5rem}:host(.lib-data-source-picker--disabled){opacity:.55;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.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: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i6.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i6.MatListItemLine, selector: "[matListItemLine]" }, { kind: "directive", type: i6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: EmptyStateComponent, selector: "lib-empty-state", inputs: ["icon", "message"] }, { kind: "component", type: MatChipListEditorComponent, selector: "lib-mat-chip-list-editor", inputs: ["disabled", "multiple", "required", "errors", "value", "options"], outputs: ["valueChange"] }, { kind: "component", type: PipelineGeneratorComponent, selector: "lib-pipeline-generator", inputs: ["disabled", "value", "getWorkflowOptions", "userName", "errors"], outputs: ["valueChanged"] }, { kind: "component", type: RequiredInputsComponent, selector: "lib-required-inputs", inputs: ["value", "formInputs", "disabled", "errors", "id"], outputs: ["valueChanged"] }, { kind: "component", type: RestApiCallSetupComponent, selector: "lib-rest-api-call-setup", inputs: ["id", "postmanCollectionConfig", "httpGetDataFunction", "disabled", "value", "errors"], outputs: ["valueChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
230
|
-
}
|
|
231
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DataSourcePickerComponent, decorators: [{
|
|
232
|
-
type: Component,
|
|
233
|
-
args: [{ selector: 'lib-data-source-picker', imports: [
|
|
234
|
-
MatButtonModule,
|
|
235
|
-
MatCardModule,
|
|
236
|
-
MatIconModule,
|
|
237
|
-
MatListModule,
|
|
238
|
-
MatTooltipModule,
|
|
239
|
-
EmptyStateComponent,
|
|
240
|
-
MatChipListEditorComponent,
|
|
241
|
-
PipelineGeneratorComponent,
|
|
242
|
-
RequiredInputsComponent,
|
|
243
|
-
RestApiCallSetupComponent,
|
|
244
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, providers: [{ provide: MatFormFieldControl, useExisting: DataSourcePickerComponent }], host: {
|
|
245
|
-
'class': 'lib-data-source-picker',
|
|
246
|
-
'[attr.id]': 'id',
|
|
247
|
-
'[class.lib-data-source-picker--focused]': 'focused',
|
|
248
|
-
'[class.lib-data-source-picker--disabled]': 'disabled',
|
|
249
|
-
}, template: "<div class=\"lib-data-source-picker__list\">\n @if (hasSources()) {\n <mat-list class=\"lib-data-source-picker__sources\">\n @for (row of rows(); track row.source.id) {\n <mat-list-item\n class=\"lib-data-source-picker__source\"\n matTooltipPosition=\"before\"\n [matTooltip]=\"row.source.source + ' ' + row.endpoint\">\n <mat-icon\n matListItemIcon\n class=\"lib-data-source-picker__icon\"\n [class.lib-data-source-picker__icon--api]=\"row.isApi\">\n {{ row.icon }}\n </mat-icon>\n <span matListItemTitle class=\"lib-data-source-picker__name\">{{ row.name }}</span>\n <span matListItemLine class=\"lib-data-source-picker__endpoint\">{{ row.endpoint }}</span>\n <button\n matListItemMeta\n mat-icon-button\n type=\"button\"\n [attr.aria-label]=\"'Remove ' + row.name\"\n [disabled]=\"disabled\"\n (click)=\"removeSource(row.source)\">\n <mat-icon>delete</mat-icon>\n </button>\n </mat-list-item>\n }\n </mat-list>\n } @else {\n <lib-empty-state icon=\"storage\" message=\"No data sources configured. Add one to get started.\" />\n }\n</div>\n\n@if (draft(); as draft) {\n <mat-card appearance=\"outlined\" class=\"lib-data-source-picker__editor\">\n <mat-card-content>\n <label [attr.for]=\"id + '-type'\" class=\"lib-data-source-picker__label\">Select source type</label>\n <lib-mat-chip-list-editor\n [id]=\"id + '-type'\"\n [value]=\"draft.source\"\n [options]=\"dataSourceOptions\"\n (valueChange)=\"sourceTypeChanged($event)\" />\n\n @if (draft.source !== undefined) {\n @switch (draft.source) {\n @case (dataSources.Api) {\n <label [attr.for]=\"id + '-api'\" class=\"lib-data-source-picker__label\">Select API</label>\n <lib-rest-api-call-setup\n [id]=\"id + '-api'\"\n [postmanCollectionConfig]=\"editorConfig?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"editorConfig?.httpGetDataFunction\"\n [value]=\"$any(draft.config)\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n\n @if (draftMinimumInputRequired(); as minimumInputRequired) {\n <lib-required-inputs\n [id]=\"id + '-required-inputs'\"\n [formInputs]=\"formInputs() || []\"\n [value]=\"minimumInputRequired\"\n [errors]=\"[]\"\n (valueChanged)=\"minimumInputRequiredValueChanged($event)\" />\n }\n }\n @case (dataSources.MongoDb) {\n <label [attr.for]=\"id + '-pipeline'\" class=\"lib-data-source-picker__label\">Add a MongoDB pipeline</label>\n <lib-pipeline-generator\n [id]=\"id + '-pipeline'\"\n [value]=\"$any(draft.config)\"\n [getWorkflowOptions]=\"editorConfig?.getWorkflowOptions\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n }\n }\n }\n </mat-card-content>\n\n <mat-card-actions class=\"lib-data-source-picker__actions\">\n <button mat-flat-button color=\"primary\" type=\"button\" (click)=\"saveNewSource()\">Save source</button>\n <span class=\"lib-data-source-picker__spacer\"></span>\n <button mat-button color=\"warn\" type=\"button\" (click)=\"cancelEditing()\">Cancel</button>\n </mat-card-actions>\n </mat-card>\n} @else {\n <button\n mat-stroked-button\n color=\"primary\"\n type=\"button\"\n class=\"lib-data-source-picker__add\"\n [disabled]=\"disabled\"\n (click)=\"startEditing()\">\n <mat-icon>add</mat-icon>\n Add data source\n </button>\n}\n", styles: [":host{display:block}.lib-data-source-picker__list{display:block}.lib-data-source-picker__sources{padding:0}.lib-data-source-picker__source{border-radius:var(--lib-forms-radius-sm, 8px)}.lib-data-source-picker__icon{color:var(--lib-forms-on-surface-variant)}.lib-data-source-picker__icon--api{color:var(--lib-forms-primary)}.lib-data-source-picker__name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lib-data-source-picker__endpoint{color:var(--lib-forms-on-surface-variant);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lib-data-source-picker__editor{margin-top:1.5rem;background:var(--lib-forms-surface)}.lib-data-source-picker__label{display:block;margin-top:.75rem;margin-bottom:.5rem;font-size:.625rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--lib-forms-on-surface-variant)}.lib-data-source-picker__actions{display:flex;align-items:center;margin-top:1.5rem}.lib-data-source-picker__spacer{flex:1 1 auto}.lib-data-source-picker__add{width:100%;margin-top:1.5rem}:host(.lib-data-source-picker--disabled){opacity:.55;pointer-events:none}\n"] }]
|
|
250
|
-
}], propDecorators: { errors: [{
|
|
251
|
-
type: Input
|
|
252
|
-
}], disabled: [{
|
|
253
|
-
type: Input
|
|
254
|
-
}], value: [{
|
|
255
|
-
type: Input
|
|
256
|
-
}], editorConfig: [{
|
|
257
|
-
type: Input
|
|
258
|
-
}], formInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "formInputs", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
259
|
-
|
|
260
|
-
export { DataSourcePickerComponent };
|
|
261
|
-
//# sourceMappingURL=ngx-t-forms-data-source-picker.component-r7OGAsxo.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-data-source-picker.component-r7OGAsxo.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/data-source-picker/data-source-picker.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/data-source-picker/data-source-picker.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n ViewEncapsulation,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport {\n APIDataFetchingConfigurationInterface,\n DataSources,\n ElementEditorInnerSectionElementInterface,\n FormColumnInputs,\n IReportDataSources,\n MinimumInputRequiredInterface,\n MongoDbPipeLineConfigInterface,\n} from 'ngx-t-forms-types';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\nimport { MatChipListEditorComponent } from '../mat-chip-list-editor/mat-chip-list-editor.component';\nimport { PipelineGeneratorComponent } from '../pipeline-generator/pipeline-generator.component';\nimport { RequiredInputsComponent } from '../required-inputs/required-inputs.component';\nimport { RestApiCallSetupComponent } from '../rest-api-call-setup/rest-api-call-setup.component';\n\n/** Source-type option rendered in the chip selector. */\ninterface DataSourceOption {\n label: string;\n value: DataSources;\n}\n\n/** A configured data source decorated with the derived fields the list row renders. */\ninterface DataSourceRow {\n readonly source: IReportDataSources;\n readonly name: string;\n readonly icon: string;\n readonly endpoint: string;\n readonly isApi: boolean;\n}\n\n/** The in-edit working draft: a partial source being composed before save. */\ntype DataSourceDraft = Partial<IReportDataSources>;\n\n/**\n * Internal editor element for configuring a report's data sources (API calls and\n * MongoDB pipelines). It is a real `MatFormFieldControl`, rendered by\n * `t-dynamic-data-edit` inside a `<mat-form-field>` — so the parent owns the\n * surrounding label, hint, and validation errors, and this component owns only\n * the source list, the inline editor card, and the add affordance.\n *\n * NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /\n * `required` / `placeholder` / `id` members, `@Input()` decorators, the\n * `focused` / `touched` / `stateChanges` members, and the `useExisting`\n * provider. These are framework wiring, not defects — the CLAUDE.md bans on\n * `@Input()` / `useExisting` do not apply to MatFormFieldControl integration.\n */\n@Component({\n selector: 'lib-data-source-picker',\n imports: [\n MatButtonModule,\n MatCardModule,\n MatIconModule,\n MatListModule,\n MatTooltipModule,\n EmptyStateComponent,\n MatChipListEditorComponent,\n PipelineGeneratorComponent,\n RequiredInputsComponent,\n RestApiCallSetupComponent,\n ],\n templateUrl: './data-source-picker.component.html',\n styleUrl: './data-source-picker.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n providers: [{ provide: MatFormFieldControl, useExisting: DataSourcePickerComponent }],\n host: {\n 'class': 'lib-data-source-picker',\n '[attr.id]': 'id',\n '[class.lib-data-source-picker--focused]': 'focused',\n '[class.lib-data-source-picker--disabled]': 'disabled',\n },\n})\nexport class DataSourcePickerComponent\n implements MatFormFieldControl<Array<IReportDataSources> | undefined>\n{\n static nextId = 0;\n\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'lib-data-source-picker';\n\n id = `lib-data-source-picker-${DataSourcePickerComponent.nextId++}`;\n placeholder = '';\n focused = false;\n touched = false;\n required = false;\n describedBy = '';\n autofilled = false;\n userAriaDescribedBy: string | undefined = undefined;\n disableAutomaticLabeling: boolean | undefined = undefined;\n\n /** Validation errors surfaced by the parent for error-state derivation. */\n @Input() errors: IConfigElementError[] | undefined = [];\n\n #disabled = false;\n /** Whether the control is inert. */\n @Input()\n get disabled(): boolean {\n return this.#disabled;\n }\n set disabled(value: boolean) {\n this.#disabled = value;\n this.stateChanges.next();\n }\n\n // Mirror of the plain MFC `value` member, so the template + computeds react.\n readonly #value = signal<Array<IReportDataSources> | undefined>(undefined);\n\n /** Current list of configured data sources. */\n @Input()\n get value(): Array<IReportDataSources> | undefined {\n return this.#value();\n }\n set value(value: Array<IReportDataSources> | undefined) {\n if (this.#value() === value) {\n return;\n }\n this.#value.set(value);\n this.stateChanges.next();\n }\n\n // Mirror of the plain `editorConfig` member, so the template reacts.\n readonly #editorConfig = signal<ElementEditorInnerSectionElementInterface | undefined>(\n undefined,\n );\n\n /** Editor configuration supplying postman / workflow option providers. */\n @Input()\n get editorConfig(): ElementEditorInnerSectionElementInterface | undefined {\n return this.#editorConfig();\n }\n set editorConfig(config: ElementEditorInnerSectionElementInterface | undefined) {\n this.#editorConfig.set(config);\n }\n\n /** All available form inputs the user can map a required input to. */\n readonly formInputs = input<Array<FormColumnInputs>>([]);\n\n /** Emits the mutated data-source list whenever the user adds or removes a source. */\n readonly valueChange = output<Array<IReportDataSources> | undefined>();\n\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Source-type enum, exposed to the template. */\n protected readonly dataSources = DataSources;\n\n /** The selectable source types in the chip selector. */\n protected readonly dataSourceOptions: DataSourceOption[] = [\n { label: 'API', value: DataSources.Api },\n { label: 'MongoDB', value: DataSources.MongoDb },\n ];\n\n /** The in-edit draft, or `undefined` when the editor card is closed. */\n protected readonly draft = signal<DataSourceDraft | undefined>(undefined);\n\n /** Decorated rows for the configured-source list. */\n protected readonly rows = computed<readonly DataSourceRow[]>(() =>\n (this.#value() ?? []).map((source, index) => ({\n source,\n name: this.#name(source, index),\n icon: source.source === DataSources.Api ? 'api' : 'storage',\n endpoint: this.#endpoint(source),\n isApi: source.source === DataSources.Api,\n })),\n );\n\n /** Whether any data source is configured. */\n protected readonly hasSources = computed<boolean>(() => (this.#value() ?? []).length > 0);\n\n /** The `minimumInputRequired` list of the draft's API config, or `undefined`. */\n protected readonly draftMinimumInputRequired = computed<\n readonly MinimumInputRequiredInterface[] | undefined\n >(() => {\n const config = this.draft()?.config;\n if (!config || !this.#isApiConfig(config)) {\n return undefined;\n }\n return config.backEndConfig?.minimumInputRequired;\n });\n\n // ---- MatFormFieldControl getters (read during the framework's CD) --------\n\n get empty(): boolean {\n return (this.#value() ?? []).length === 0;\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get errorState(): boolean {\n const requiredUnset = this.empty && this.required;\n const ngControlError = this.ngControl?.errors != null;\n const externalError = (this.errors?.length ?? 0) > 0 && this.touched;\n return requiredUnset || ngControlError || externalError;\n }\n\n setDescribedByIds(ids: string[]): void {\n this.describedBy = ids.join(' ');\n const el = this.#elementRef.nativeElement;\n const control = el.querySelector('.lib-data-source-picker__list');\n control?.setAttribute('aria-describedby', this.describedBy);\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n this.markAsTouched();\n if (!this.focused) {\n this.focused = true;\n }\n this.stateChanges.next();\n }\n\n onTouched: () => void = () => {};\n\n markAsTouched(): void {\n if (!this.touched) {\n this.touched = true;\n this.onTouched();\n this.stateChanges.next();\n }\n }\n\n // ---- Draft editing -------------------------------------------------------\n\n /** Open the editor card with an empty draft. */\n protected startEditing(): void {\n this.draft.set({});\n }\n\n /** Discard the draft and close the editor card. */\n protected cancelEditing(): void {\n this.draft.set(undefined);\n }\n\n /** Set the draft's source type. Child chip editor emits an unknown payload. */\n protected sourceTypeChanged(source: unknown): void {\n this.draft.update((current) =>\n current ? { ...current, source: source as DataSources | undefined } : current,\n );\n }\n\n /** Set the draft's source config (API setup or pipeline). */\n protected sourceConfigChanged(\n config: APIDataFetchingConfigurationInterface | MongoDbPipeLineConfigInterface | undefined,\n ): void {\n this.draft.update((current) => (current ? { ...current, config } : current));\n }\n\n /** Merge the required-input list into the draft's API config. */\n protected minimumInputRequiredValueChanged(\n value: Array<MinimumInputRequiredInterface>,\n ): void {\n this.draft.update((current) => {\n if (!current?.config || !this.#isApiConfig(current.config)) {\n return current;\n }\n const config: APIDataFetchingConfigurationInterface = {\n ...current.config,\n backEndConfig: { ...current.config.backEndConfig, minimumInputRequired: value },\n };\n return { ...current, config };\n });\n }\n\n /** Commit the draft as a new source (assigning a fresh id) and emit. */\n protected saveNewSource(): void {\n const current = this.draft();\n if (!current) {\n return;\n }\n const data: IReportDataSources = { ...current, id: crypto.randomUUID() } as IReportDataSources;\n const next = [...(this.#value() ?? []), data];\n this.value = next;\n this.draft.set(undefined);\n this.markAsTouched();\n this.valueChange.emit(next);\n }\n\n /** Remove a configured source by id and emit. */\n protected removeSource(source: IReportDataSources): void {\n const current = this.#value();\n if (!current) {\n return;\n }\n const next = current.filter((item) => item.id !== source.id);\n this.value = next;\n this.markAsTouched();\n this.valueChange.emit(next);\n }\n\n #name(value: IReportDataSources, index: number): string {\n if (this.#isApiConfig(value.config) && value.config.name) {\n return value.config.name;\n }\n return value.source === DataSources.Api ? `API ${index + 1}` : `MongoDB ${index + 1}`;\n }\n\n #endpoint(value: IReportDataSources): string {\n if (this.#isApiConfig(value.config)) {\n return value.config.httpEndPoint ?? '';\n }\n return value.config.workflowId ?? '';\n }\n\n #isApiConfig(\n config: APIDataFetchingConfigurationInterface | MongoDbPipeLineConfigInterface | undefined,\n ): config is APIDataFetchingConfigurationInterface {\n return config?.source === DataSources.Api;\n }\n}\n","<div class=\"lib-data-source-picker__list\">\n @if (hasSources()) {\n <mat-list class=\"lib-data-source-picker__sources\">\n @for (row of rows(); track row.source.id) {\n <mat-list-item\n class=\"lib-data-source-picker__source\"\n matTooltipPosition=\"before\"\n [matTooltip]=\"row.source.source + ' ' + row.endpoint\">\n <mat-icon\n matListItemIcon\n class=\"lib-data-source-picker__icon\"\n [class.lib-data-source-picker__icon--api]=\"row.isApi\">\n {{ row.icon }}\n </mat-icon>\n <span matListItemTitle class=\"lib-data-source-picker__name\">{{ row.name }}</span>\n <span matListItemLine class=\"lib-data-source-picker__endpoint\">{{ row.endpoint }}</span>\n <button\n matListItemMeta\n mat-icon-button\n type=\"button\"\n [attr.aria-label]=\"'Remove ' + row.name\"\n [disabled]=\"disabled\"\n (click)=\"removeSource(row.source)\">\n <mat-icon>delete</mat-icon>\n </button>\n </mat-list-item>\n }\n </mat-list>\n } @else {\n <lib-empty-state icon=\"storage\" message=\"No data sources configured. Add one to get started.\" />\n }\n</div>\n\n@if (draft(); as draft) {\n <mat-card appearance=\"outlined\" class=\"lib-data-source-picker__editor\">\n <mat-card-content>\n <label [attr.for]=\"id + '-type'\" class=\"lib-data-source-picker__label\">Select source type</label>\n <lib-mat-chip-list-editor\n [id]=\"id + '-type'\"\n [value]=\"draft.source\"\n [options]=\"dataSourceOptions\"\n (valueChange)=\"sourceTypeChanged($event)\" />\n\n @if (draft.source !== undefined) {\n @switch (draft.source) {\n @case (dataSources.Api) {\n <label [attr.for]=\"id + '-api'\" class=\"lib-data-source-picker__label\">Select API</label>\n <lib-rest-api-call-setup\n [id]=\"id + '-api'\"\n [postmanCollectionConfig]=\"editorConfig?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"editorConfig?.httpGetDataFunction\"\n [value]=\"$any(draft.config)\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n\n @if (draftMinimumInputRequired(); as minimumInputRequired) {\n <lib-required-inputs\n [id]=\"id + '-required-inputs'\"\n [formInputs]=\"formInputs() || []\"\n [value]=\"minimumInputRequired\"\n [errors]=\"[]\"\n (valueChanged)=\"minimumInputRequiredValueChanged($event)\" />\n }\n }\n @case (dataSources.MongoDb) {\n <label [attr.for]=\"id + '-pipeline'\" class=\"lib-data-source-picker__label\">Add a MongoDB pipeline</label>\n <lib-pipeline-generator\n [id]=\"id + '-pipeline'\"\n [value]=\"$any(draft.config)\"\n [getWorkflowOptions]=\"editorConfig?.getWorkflowOptions\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n }\n }\n }\n </mat-card-content>\n\n <mat-card-actions class=\"lib-data-source-picker__actions\">\n <button mat-flat-button color=\"primary\" type=\"button\" (click)=\"saveNewSource()\">Save source</button>\n <span class=\"lib-data-source-picker__spacer\"></span>\n <button mat-button color=\"warn\" type=\"button\" (click)=\"cancelEditing()\">Cancel</button>\n </mat-card-actions>\n </mat-card>\n} @else {\n <button\n mat-stroked-button\n color=\"primary\"\n type=\"button\"\n class=\"lib-data-source-picker__add\"\n [disabled]=\"disabled\"\n (click)=\"startEditing()\">\n <mat-icon>add</mat-icon>\n Add data source\n </button>\n}\n"],"names":["i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsDA;;;;;;;;;;;;AAYG;MA2BU,yBAAyB,CAAA;AA1BtC,IAAA,WAAA,GAAA;;AAgCW,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QAClC,IAAA,CAAA,WAAW,GAAG,wBAAwB;AAE/C,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,uBAAA,EAA0B,yBAAyB,CAAC,MAAM,EAAE,EAAE;QACnE,IAAA,CAAA,WAAW,GAAG,EAAE;QAChB,IAAA,CAAA,OAAO,GAAG,KAAK;QACf,IAAA,CAAA,OAAO,GAAG,KAAK;QACf,IAAA,CAAA,QAAQ,GAAG,KAAK;QAChB,IAAA,CAAA,WAAW,GAAG,EAAE;QAChB,IAAA,CAAA,UAAU,GAAG,KAAK;QAClB,IAAA,CAAA,mBAAmB,GAAuB,SAAS;QACnD,IAAA,CAAA,wBAAwB,GAAwB,SAAS;;QAGhD,IAAA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