ngx-t-forms 3.1.8 → 3.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{ngx-t-forms-api-endpoint-config.component-B4a-L4Eq.mjs → ngx-t-forms-api-endpoint-config.component-BbS1dY0l.mjs} +10 -10
- package/fesm2022/ngx-t-forms-api-endpoint-config.component-BbS1dY0l.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DqRunUz4.mjs → ngx-t-forms-auto-complete-input-element.component-B8eluIrh.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DqRunUz4.mjs.map → ngx-t-forms-auto-complete-input-element.component-B8eluIrh.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-autofillToken-D-BYfzxR.mjs +189 -0
- package/fesm2022/ngx-t-forms-autofillToken-D-BYfzxR.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-t8bTUgZ1.mjs → ngx-t-forms-basic-input-input-element.component-SSLXyCz9.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-t8bTUgZ1.mjs.map → ngx-t-forms-basic-input-input-element.component-SSLXyCz9.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-PcjMdAKu.mjs → ngx-t-forms-calculated-field-rules.component-Cn_rxXMX.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-PcjMdAKu.mjs.map → ngx-t-forms-calculated-field-rules.component-Cn_rxXMX.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-Ca4rim_J.mjs → ngx-t-forms-chip-options-creator-editor.component-CGm5tgsp.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-Ca4rim_J.mjs.map → ngx-t-forms-chip-options-creator-editor.component-CGm5tgsp.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-clamp-probe.directive-DMUdeVrM.mjs +99 -0
- package/fesm2022/ngx-t-forms-clamp-probe.directive-DMUdeVrM.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-conditional-display-config.component-Di7p76_n.mjs → ngx-t-forms-conditional-display-config.component-DIMIWTKj.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-conditional-display-config.component-Di7p76_n.mjs.map → ngx-t-forms-conditional-display-config.component-DIMIWTKj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CXMmDwKS.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-DKb3E9gA.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CXMmDwKS.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-DKb3E9gA.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-data-source-picker.component-DioXvLi3.mjs → ngx-t-forms-data-source-picker.component-BG_sr5VH.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-data-source-picker.component-DioXvLi3.mjs.map → ngx-t-forms-data-source-picker.component-BG_sr5VH.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-h0S6qZDT.mjs → ngx-t-forms-date-picker-input-element.component-vUlUuzJ0.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-h0S6qZDT.mjs.map → ngx-t-forms-date-picker-input-element.component-vUlUuzJ0.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-8c1ErbgP.mjs → ngx-t-forms-date-range-picker-input-element.component-YVE_s-7Y.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-8c1ErbgP.mjs.map → ngx-t-forms-date-range-picker-input-element.component-YVE_s-7Y.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-time-picker-input-element.component-BgjGlXeq.mjs → ngx-t-forms-date-time-picker-input-element.component-BlOS8NdF.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-date-time-picker-input-element.component-BgjGlXeq.mjs.map → ngx-t-forms-date-time-picker-input-element.component-BlOS8NdF.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-u2UUPdAo.mjs +623 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-u2UUPdAo.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-document-picker.component-DYpsBHxT.mjs → ngx-t-forms-document-picker.component-DOYyRgh4.mjs} +41 -11
- package/fesm2022/{ngx-t-forms-document-picker.component-DYpsBHxT.mjs.map → ngx-t-forms-document-picker.component-DOYyRgh4.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-editor-input-element.component-CzNSb79n.mjs → ngx-t-forms-editor-input-element.component-BvZPNjQX.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-editor-input-element.component-CzNSb79n.mjs.map → ngx-t-forms-editor-input-element.component-BvZPNjQX.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-FPxHxAwF.mjs → ngx-t-forms-file-upload-input-element.component-CONELqoi.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-FPxHxAwF.mjs.map → ngx-t-forms-file-upload-input-element.component-CONELqoi.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-copy-lint.component-TCSe-27-.mjs +248 -0
- package/fesm2022/ngx-t-forms-form-copy-lint.component-TCSe-27-.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-form-input-selector.component-B3ES53R-.mjs → ngx-t-forms-form-input-selector.component-Bdkuzw0R.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-input-selector.component-B3ES53R-.mjs.map → ngx-t-forms-form-input-selector.component-Bdkuzw0R.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-Cu_ZEw1V.mjs → ngx-t-forms-form-json-view.component-CDcbgWgN.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-Cu_ZEw1V.mjs.map → ngx-t-forms-form-json-view.component-CDcbgWgN.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-DmTGnRgi.mjs → ngx-t-forms-form-section-stepper.component-CqLSI8zP.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-DmTGnRgi.mjs.map → ngx-t-forms-form-section-stepper.component-CqLSI8zP.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-6m2BM9e9.mjs → ngx-t-forms-forms-builder-menu.component-DFCVe_Fq.mjs} +185 -15
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-DFCVe_Fq.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-forms-native-date-adapter-CCJT5ep1.mjs → ngx-t-forms-forms-native-date-adapter-h6fClNMS.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-forms-native-date-adapter-CCJT5ep1.mjs.map → ngx-t-forms-forms-native-date-adapter-h6fClNMS.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-geo-location.component-DgXSaH0t.mjs → ngx-t-forms-geo-location.component-DA3ATrvw.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-geo-location.component-DgXSaH0t.mjs.map → ngx-t-forms-geo-location.component-DA3ATrvw.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-header-template-editor.component-NJLm6jkA.mjs → ngx-t-forms-header-template-editor.component-B9Cj8dOI.mjs} +13 -5
- package/fesm2022/ngx-t-forms-header-template-editor.component-B9Cj8dOI.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-iqPS9cPK.mjs → ngx-t-forms-image-capture-input-element.component-C9oz_ZjA.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-iqPS9cPK.mjs.map → ngx-t-forms-image-capture-input-element.component-C9oz_ZjA.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-index-CSXX8RTm.mjs +2 -0
- package/fesm2022/ngx-t-forms-index-CSXX8RTm.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-custom.component-BOy_3JqU.mjs → ngx-t-forms-input-custom.component-CqIr5wpy.mjs} +91 -25
- package/fesm2022/ngx-t-forms-input-custom.component-CqIr5wpy.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-editor.component-IUrZNmA5.mjs → ngx-t-forms-input-editor.component-DU2sgo4i.mjs} +9 -9
- package/fesm2022/{ngx-t-forms-input-editor.component-IUrZNmA5.mjs.map → ngx-t-forms-input-editor.component-DU2sgo4i.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-CtTAw9jk.mjs → ngx-t-forms-map-mat-options-keys-WfFq_0tS.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-CtTAw9jk.mjs.map → ngx-t-forms-map-mat-options-keys-WfFq_0tS.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C9bxVpQ1.mjs → ngx-t-forms-mat-chip-list-editor.component-CKnvqeix.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C9bxVpQ1.mjs.map → ngx-t-forms-mat-chip-list-editor.component-CKnvqeix.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BpiCchqY.mjs → ngx-t-forms-missing-form-configs.component-B5dDbmpj.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BpiCchqY.mjs.map → ngx-t-forms-missing-form-configs.component-B5dDbmpj.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-97tHCSyK.mjs +37 -0
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-97tHCSyK.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mscoa-config.component-soUwIbVA.mjs → ngx-t-forms-mscoa-config.component-BtLd7F2n.mjs} +10 -10
- package/fesm2022/{ngx-t-forms-mscoa-config.component-soUwIbVA.mjs.map → ngx-t-forms-mscoa-config.component-BtLd7F2n.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs → ngx-t-forms-mscoa-error-display.component-Bmt1vboD.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs.map → ngx-t-forms-mscoa-error-display.component-Bmt1vboD.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component--3DvQm1K.mjs → ngx-t-forms-mscoa-segment-config.component-DrzpixbK.mjs} +9 -9
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component--3DvQm1K.mjs.map → ngx-t-forms-mscoa-segment-config.component-DrzpixbK.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs → ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs.map → ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-ddpips7E.mjs +3592 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-ddpips7E.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-CaVyRedJ.mjs → ngx-t-forms-ngx-t-forms-C1kZpYIM.mjs} +9303 -2202
- package/fesm2022/ngx-t-forms-ngx-t-forms-C1kZpYIM.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-paginated-selection-table-B7TyhJnh.mjs +596 -0
- package/fesm2022/ngx-t-forms-paginated-selection-table-B7TyhJnh.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-payload-template-editor.component-CVj-G4MC.mjs → ngx-t-forms-payload-template-editor.component-DVL4aBuG.mjs} +13 -5
- package/fesm2022/ngx-t-forms-payload-template-editor.component-DVL4aBuG.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-BMyZKOXv.mjs → ngx-t-forms-pipeline-generator.component-DpqipW6G.mjs} +15 -15
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-BMyZKOXv.mjs.map → ngx-t-forms-pipeline-generator.component-DpqipW6G.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-quill-input.component-oUnmMDGi.mjs → ngx-t-forms-quill-input.component-x9CHGOJy.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-quill-input.component-oUnmMDGi.mjs.map → ngx-t-forms-quill-input.component-x9CHGOJy.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-record-list-manager.component-CdQU6loA.mjs → ngx-t-forms-record-list-manager.component-BGg86NER.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-record-list-manager.component-CdQU6loA.mjs.map → ngx-t-forms-record-list-manager.component-BGg86NER.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-CI9nLVXe.mjs +281 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-CI9nLVXe.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-B5w1Lvfo.mjs → ngx-t-forms-rest-api-call-setup.component-B4LzPwxg.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-B5w1Lvfo.mjs.map → ngx-t-forms-rest-api-call-setup.component-B4LzPwxg.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-section-report.component-CocLNrN5.mjs → ngx-t-forms-section-report.component-BS2CV_xl.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-section-report.component-CocLNrN5.mjs.map → ngx-t-forms-section-report.component-BS2CV_xl.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-select-input-element.component-C5qjqCXW.mjs +281 -0
- package/fesm2022/ngx-t-forms-select-input-element.component-C5qjqCXW.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-CBdC0WCz.mjs → ngx-t-forms-selection-options-editor.component-B6sYvtcj.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-CBdC0WCz.mjs.map → ngx-t-forms-selection-options-editor.component-B6sYvtcj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs → ngx-t-forms-t-workflow-picker.component-xDbl63v1.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs.map → ngx-t-forms-t-workflow-picker.component-xDbl63v1.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-GXiLEsTp.mjs → ngx-t-forms-textarea-input-element.component-ri0r0ujE.mjs} +77 -11
- package/fesm2022/ngx-t-forms-textarea-input-element.component-ri0r0ujE.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-toggle-input-element.component-CXUqCipx.mjs +124 -0
- package/fesm2022/ngx-t-forms-toggle-input-element.component-CXUqCipx.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-token-text-input.component-BMzPBtY_.mjs → ngx-t-forms-token-text-input.component-BWmoGQfi.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-token-text-input.component-BMzPBtY_.mjs.map → ngx-t-forms-token-text-input.component-BWmoGQfi.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-DWDBsV6a.mjs → ngx-t-forms-validators-config.component-DEm9M5s9.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-validators-config.component-DWDBsV6a.mjs.map → ngx-t-forms-validators-config.component-DEm9M5s9.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-DxObFakZ.mjs → ngx-t-forms-workflow-adjudication.component-BOC9Z40E.mjs} +28 -26
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-BOC9Z40E.mjs.map +1 -0
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/package.json +2 -2
- package/types/ngx-t-forms.d.ts +2370 -38
- package/fesm2022/ngx-t-forms-api-endpoint-config.component-B4a-L4Eq.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-BhVM8PFR.mjs +0 -373
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-BhVM8PFR.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-6m2BM9e9.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-header-template-editor.component-NJLm6jkA.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-index-zLon09cE.mjs +0 -2
- package/fesm2022/ngx-t-forms-index-zLon09cE.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-custom.component-BOy_3JqU.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-CjUf0zTA.mjs +0 -38
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-CjUf0zTA.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BZxpJRxJ.mjs +0 -2472
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BZxpJRxJ.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-CaVyRedJ.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-paginated-selection-table-DzZE-Zde.mjs +0 -557
- package/fesm2022/ngx-t-forms-paginated-selection-table-DzZE-Zde.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-payload-template-editor.component-CVj-G4MC.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-BtfEsmva.mjs +0 -271
- package/fesm2022/ngx-t-forms-required-inputs.component-BtfEsmva.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-select-input-element.component-B03O4cAK.mjs +0 -160
- package/fesm2022/ngx-t-forms-select-input-element.component-B03O4cAK.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-textarea-input-element.component-GXiLEsTp.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-toggle-input-element.component-WErP0SsA.mjs +0 -93
- package/fesm2022/ngx-t-forms-toggle-input-element.component-WErP0SsA.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-DxObFakZ.mjs.map +0 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, DestroyRef, signal, afterNextRender, Directive } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
const sharedByWindow = new WeakMap();
|
|
5
|
+
function sharedObserversFor(view) {
|
|
6
|
+
const existing = sharedByWindow.get(view);
|
|
7
|
+
if (existing)
|
|
8
|
+
return existing;
|
|
9
|
+
const measures = new WeakMap();
|
|
10
|
+
const resize = new view.ResizeObserver((entries) => {
|
|
11
|
+
for (const entry of entries)
|
|
12
|
+
measures.get(entry.target)?.();
|
|
13
|
+
});
|
|
14
|
+
const mutation = new view.MutationObserver((records) => {
|
|
15
|
+
const touched = new Set();
|
|
16
|
+
for (const record of records) {
|
|
17
|
+
// A text-node change reports the text node; walk up to the probed host.
|
|
18
|
+
let node = record.target;
|
|
19
|
+
while (node) {
|
|
20
|
+
const measure = node instanceof view.Element ? measures.get(node) : undefined;
|
|
21
|
+
if (measure) {
|
|
22
|
+
touched.add(measure);
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
node = node.parentNode;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
touched.forEach((measure) => measure());
|
|
29
|
+
});
|
|
30
|
+
const shared = { resize, mutation, measures };
|
|
31
|
+
sharedByWindow.set(view, shared);
|
|
32
|
+
return shared;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Reports whether its host's text is visually clamped (a `line-clamp` cell cut
|
|
36
|
+
* off with an ellipsis), measured as `scrollHeight > clientHeight` rather than
|
|
37
|
+
* guessed from a character count. The read-only table uses it to give exactly
|
|
38
|
+
* the clamped cells — and no others — a tooltip and a keyboard focus stop.
|
|
39
|
+
*
|
|
40
|
+
* Re-measures when the box resizes (column width, viewport, font load) and
|
|
41
|
+
* when the text inside it changes. Measures nothing on the server or where
|
|
42
|
+
* `ResizeObserver` is missing, in which case `clamped()` stays `false` and the
|
|
43
|
+
* cell simply shows its two lines.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* <span class="clamped-2" libClampProbe #probe="libClampProbe">{{ text }}</span>
|
|
47
|
+
* @if (probe.clamped()) { … }
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
class ClampProbeDirective {
|
|
52
|
+
#host;
|
|
53
|
+
#destroyRef;
|
|
54
|
+
#clamped;
|
|
55
|
+
constructor() {
|
|
56
|
+
this.#host = inject(ElementRef);
|
|
57
|
+
this.#destroyRef = inject(DestroyRef);
|
|
58
|
+
this.#clamped = signal(false, ...(ngDevMode ? [{ debugName: "#clamped" }] : /* istanbul ignore next */ []));
|
|
59
|
+
/** True while the host's content overflows its clamped box, i.e. part of the text is hidden. */
|
|
60
|
+
this.clamped = this.#clamped.asReadonly();
|
|
61
|
+
afterNextRender(() => this.#observe());
|
|
62
|
+
}
|
|
63
|
+
/** Starts measuring through the window's shared observers; the host is released on destroy. */
|
|
64
|
+
#observe() {
|
|
65
|
+
const element = this.#host.nativeElement;
|
|
66
|
+
const view = element.ownerDocument.defaultView;
|
|
67
|
+
if (!view || typeof view.ResizeObserver === 'undefined' || typeof view.MutationObserver === 'undefined') {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const measure = () => {
|
|
71
|
+
// A one-pixel tolerance absorbs sub-pixel rounding of the line box.
|
|
72
|
+
this.#clamped.set(element.scrollHeight - element.clientHeight > 1);
|
|
73
|
+
};
|
|
74
|
+
const shared = sharedObserversFor(view);
|
|
75
|
+
shared.measures.set(element, measure);
|
|
76
|
+
shared.resize.observe(element);
|
|
77
|
+
// The text can change without the clamped box changing size (two lines stay two lines).
|
|
78
|
+
shared.mutation.observe(element, { childList: true, characterData: true, subtree: true });
|
|
79
|
+
measure();
|
|
80
|
+
this.#destroyRef.onDestroy(() => {
|
|
81
|
+
shared.resize.unobserve(element);
|
|
82
|
+
shared.measures.delete(element);
|
|
83
|
+
// MutationObserver has no per-target unobserve; a detached host stops producing
|
|
84
|
+
// records, and the WeakMap entry is gone, so a late record is a no-op.
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ClampProbeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
88
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.12", type: ClampProbeDirective, isStandalone: true, selector: "[libClampProbe]", exportAs: ["libClampProbe"], ngImport: i0 }); }
|
|
89
|
+
}
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ClampProbeDirective, decorators: [{
|
|
91
|
+
type: Directive,
|
|
92
|
+
args: [{
|
|
93
|
+
selector: '[libClampProbe]',
|
|
94
|
+
exportAs: 'libClampProbe',
|
|
95
|
+
}]
|
|
96
|
+
}], ctorParameters: () => [] });
|
|
97
|
+
|
|
98
|
+
export { ClampProbeDirective };
|
|
99
|
+
//# sourceMappingURL=ngx-t-forms-clamp-probe.directive-DMUdeVrM.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-clamp-probe.directive-DMUdeVrM.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/multiple-input-input-element/core/multiple-input-table-view/clamp-probe.directive.ts"],"sourcesContent":["import { DestroyRef, Directive, ElementRef, afterNextRender, inject, signal } from '@angular/core';\n\n/** Re-measures one probed element. */\ntype Measure = () => void;\n\n/**\n * One ResizeObserver and one MutationObserver per window, shared by every probe:\n * a line-item table can hold hundreds of read-only cells, and an observer pair\n * per cell is wasteful. Each probed host is keyed to its own measure callback.\n */\ninterface SharedObservers {\n readonly resize: ResizeObserver;\n readonly mutation: MutationObserver;\n readonly measures: WeakMap<Element, Measure>;\n}\n\nconst sharedByWindow = new WeakMap<Window, SharedObservers>();\n\nfunction sharedObserversFor(view: Window & typeof globalThis): SharedObservers {\n const existing = sharedByWindow.get(view);\n if (existing) return existing;\n const measures = new WeakMap<Element, Measure>();\n const resize = new view.ResizeObserver((entries) => {\n for (const entry of entries) measures.get(entry.target)?.();\n });\n const mutation = new view.MutationObserver((records) => {\n const touched = new Set<Measure>();\n for (const record of records) {\n // A text-node change reports the text node; walk up to the probed host.\n let node: Node | null = record.target;\n while (node) {\n const measure = node instanceof view.Element ? measures.get(node) : undefined;\n if (measure) {\n touched.add(measure);\n break;\n }\n node = node.parentNode;\n }\n }\n touched.forEach((measure) => measure());\n });\n const shared: SharedObservers = { resize, mutation, measures };\n sharedByWindow.set(view, shared);\n return shared;\n}\n\n/**\n * Reports whether its host's text is visually clamped (a `line-clamp` cell cut\n * off with an ellipsis), measured as `scrollHeight > clientHeight` rather than\n * guessed from a character count. The read-only table uses it to give exactly\n * the clamped cells — and no others — a tooltip and a keyboard focus stop.\n *\n * Re-measures when the box resizes (column width, viewport, font load) and\n * when the text inside it changes. Measures nothing on the server or where\n * `ResizeObserver` is missing, in which case `clamped()` stays `false` and the\n * cell simply shows its two lines.\n *\n * @example\n * <span class=\"clamped-2\" libClampProbe #probe=\"libClampProbe\">{{ text }}</span>\n * @if (probe.clamped()) { … }\n *\n * @internal\n */\n@Directive({\n selector: '[libClampProbe]',\n exportAs: 'libClampProbe',\n})\nexport class ClampProbeDirective {\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly #destroyRef = inject(DestroyRef);\n readonly #clamped = signal(false);\n\n /** True while the host's content overflows its clamped box, i.e. part of the text is hidden. */\n readonly clamped = this.#clamped.asReadonly();\n\n constructor() {\n afterNextRender(() => this.#observe());\n }\n\n /** Starts measuring through the window's shared observers; the host is released on destroy. */\n #observe(): void {\n const element = this.#host.nativeElement;\n const view = element.ownerDocument.defaultView;\n if (!view || typeof view.ResizeObserver === 'undefined' || typeof view.MutationObserver === 'undefined') {\n return;\n }\n\n const measure = (): void => {\n // A one-pixel tolerance absorbs sub-pixel rounding of the line box.\n this.#clamped.set(element.scrollHeight - element.clientHeight > 1);\n };\n\n const shared = sharedObserversFor(view);\n shared.measures.set(element, measure);\n shared.resize.observe(element);\n // The text can change without the clamped box changing size (two lines stay two lines).\n shared.mutation.observe(element, { childList: true, characterData: true, subtree: true });\n measure();\n\n this.#destroyRef.onDestroy(() => {\n shared.resize.unobserve(element);\n shared.measures.delete(element);\n // MutationObserver has no per-target unobserve; a detached host stops producing\n // records, and the WeakMap entry is gone, so a late record is a no-op.\n });\n }\n}\n"],"names":[],"mappings":";;;AAgBA,MAAM,cAAc,GAAG,IAAI,OAAO,EAA2B;AAE7D,SAAS,kBAAkB,CAAC,IAAgC,EAAA;IAC1D,MAAM,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC;AACzC,IAAA,IAAI,QAAQ;AAAE,QAAA,OAAO,QAAQ;AAC7B,IAAA,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAoB;IAChD,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,KAAI;QACjD,KAAK,MAAM,KAAK,IAAI,OAAO;YAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;AAC7D,IAAA,CAAC,CAAC;IACF,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,KAAI;AACrD,QAAA,MAAM,OAAO,GAAG,IAAI,GAAG,EAAW;AAClC,QAAA,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;;AAE5B,YAAA,IAAI,IAAI,GAAgB,MAAM,CAAC,MAAM;YACrC,OAAO,IAAI,EAAE;gBACX,MAAM,OAAO,GAAG,IAAI,YAAY,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,SAAS;gBAC7E,IAAI,OAAO,EAAE;AACX,oBAAA,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;o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AkB,CAAC,IAAI,CAAC;QACvC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC;AACrC,QAAA,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;;QAE9B,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACzF,QAAA,OAAO,EAAE;AAET,QAAA,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,MAAK;AAC9B,YAAA,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC;AAChC,YAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;;;AAGjC,QAAA,CAAC,CAAC;IACJ;+GAtCW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,eAAe;AAC1B,iBAAA;;;;;"}
|
|
@@ -14,7 +14,7 @@ import { MatCardModule } from '@angular/material/card';
|
|
|
14
14
|
import * as i5 from '@angular/material/tooltip';
|
|
15
15
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
16
|
import { Subject } from 'rxjs';
|
|
17
|
-
import { P as PREDICATE_OPERATORS, r as referencedTokens,
|
|
17
|
+
import { P as PREDICATE_OPERATORS, r as referencedTokens, l as evaluatePredicate, k as parseConditions, m as emptyCondition, s as serializeConditions, n as deriveObservedInputs } from './ngx-t-forms-ngx-t-forms-C1kZpYIM.mjs';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Internal editor implementing `MatFormFieldControl<ConditionalInputRule[]>` for
|
|
@@ -510,4 +510,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
510
510
|
}], mapToData: [{ type: i0.Input, args: [{ isSignal: true, alias: "mapToData", required: false }] }], formInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "formInputs", required: false }] }], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }] } });
|
|
511
511
|
|
|
512
512
|
export { ConditionalDisplayConfigComponent };
|
|
513
|
-
//# sourceMappingURL=ngx-t-forms-conditional-display-config.component-
|
|
513
|
+
//# sourceMappingURL=ngx-t-forms-conditional-display-config.component-DIMIWTKj.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-conditional-display-config.component-Di7p76_n.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/conditional-display-config/conditional-display-config.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/conditional-display-config/conditional-display-config.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n type OnChanges,\n type OnDestroy,\n type SimpleChanges,\n ViewEncapsulation,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport { v4 as uuidv4 } from 'uuid';\n\nimport type { ConditionalInputRule, FormColumnInputs } from 'ngx-t-forms-types';\nimport { CalculationFunctions, InputDataTypes, InputTypes } from 'ngx-t-forms-types';\n\nimport { CommonModule } from '@angular/common';\nimport { NgControl } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { Subject } from 'rxjs';\n\nimport { evaluatePredicate } from '../../../../shared/functions/array-access/predicate-dsl';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\nimport {\n type FieldBinding,\n PREDICATE_OPERATORS,\n type ValidatorCondition,\n type ValidatorConditionGroup,\n deriveObservedInputs,\n emptyCondition,\n parseConditions,\n referencedTokens,\n serializeConditions,\n} from '../validators-config/validator-condition';\n\n/** A selectable field in the condition builder's field/value dropdowns. */\ninterface FieldOption {\n readonly variable: string;\n readonly label: string;\n readonly isSelf: boolean;\n /** A multiple-input column (lives inside a repeatable group). */\n readonly isMultiple: boolean;\n /** Whether the field holds a numeric value (gates numeric aggregates). */\n readonly numeric: boolean;\n /** The input read at runtime: a primary input id, or a list sub-item id. */\n readonly inputId: string;\n /** Row-array container id, for multiple-input columns. */\n readonly parentInputId?: string;\n}\n\n/** A friendly aggregate choice shown for a referenced list field. */\ninterface AggregateOption {\n readonly value: CalculationFunctions;\n readonly label: string;\n}\n\n/**\n * Internal editor implementing `MatFormFieldControl<ConditionalInputRule[]>` for\n * authoring a form input's **conditional display** rule.\n *\n * ### Relationship to `validators-config`\n *\n * This is `validators-config` minus `message` and `canOverride`, and minus the\n * multi-rule chip list. It reuses that editor's condition model verbatim —\n * `parseConditions` / `serializeConditions` / `emptyCondition` /\n * `deriveObservedInputs` / `PREDICATE_OPERATORS` — so an author who has written\n * a validator already knows how to write a display rule, and the engine reads\n * both through the same `readDep` dependency model.\n *\n * The one thing that differs is **polarity**, and the copy in the template leans\n * on it hard because getting it backwards is the obvious authoring mistake:\n *\n * | | Expression `true` means |\n * |---|---|\n * | a validator | the entry is **invalid** |\n * | a display rule | the field is **shown** |\n *\n * ### Why exactly one rule\n *\n * `conditionalInputConfig` is an array, and the engine combines multiple rules\n * with AND. This editor deliberately authors a **single** rule: the guided\n * builder already composes many conditions with All/Any inside one expression,\n * so a second rule would add a second, less visible combination layer that means\n * something subtly different. Keeping it to one makes the AND-across-rules\n * semantics unreachable through the UI — it exists only for hand-authored\n * configuration.\n *\n * ### Committing\n *\n * Unlike the validator editor there is no draft/Save cycle: with one rule and no\n * message to compose, every change commits immediately. A half-built condition\n * serialises to an empty expression, which the engine treats as *no rule* — so\n * an incomplete edit leaves the field visible rather than making it vanish\n * mid-authoring.\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-conditional-display-config',\n templateUrl: './conditional-display-config.component.html',\n styleUrls: ['./conditional-display-config.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n MatButtonToggleModule,\n MatCardModule,\n MatTooltipModule,\n ],\n providers: [{ provide: MatFormFieldControl, useExisting: ConditionalDisplayConfigComponent }],\n host: {\n 'class': 'lib-conditional-display-config',\n '[attr.id]': 'id',\n },\n})\nexport class ConditionalDisplayConfigComponent\n implements MatFormFieldControl<ConditionalInputRule[]>, OnChanges, OnDestroy {\n static nextId = 0;\n\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'lib-conditional-display-config';\n\n id = `lib-conditional-display-config-${ConditionalDisplayConfigComponent.nextId++}`;\n placeholder = '';\n focused = false;\n touched = false;\n required = false;\n describedBy = '';\n autofilled: boolean | undefined = undefined;\n userAriaDescribedBy: string | undefined = undefined;\n disableAutomaticLabeling: boolean | undefined = undefined;\n\n /** Whether the editor is inert. Kept as `@Input()` for the MFC contract. */\n @Input() disabled = false;\n /** Current rule list. Kept as `@Input()` for the MFC contract. */\n @Input() value: ConditionalInputRule[] = [];\n /** Validation errors surfaced by the parent for error-state derivation. */\n @Input() errors: IConfigElementError[] | undefined = [];\n\n /** The input that owns this rule (for multiple-input scopes + self-labelling). */\n readonly mapToData = input<FormColumnInputs | undefined>(undefined);\n /** Available form inputs offered as variables. */\n readonly formInputs = input<Array<FormColumnInputs>>([]);\n\n /** Emits the full rule list whenever it changes. */\n readonly valueChanged = output<ConditionalInputRule[]>();\n\n /** Operator choices shared with the validator + array-access builders. */\n protected readonly operators = PREDICATE_OPERATORS;\n\n /** Aggregate choices for a list field, with non-technical labels. */\n protected readonly aggregates: readonly AggregateOption[] = [\n { value: CalculationFunctions.Sum, label: 'total' },\n { value: CalculationFunctions.Avg, label: 'average' },\n { value: CalculationFunctions.Min, label: 'lowest' },\n { value: CalculationFunctions.Max, label: 'highest' },\n { value: CalculationFunctions.Count, label: 'count' },\n ];\n\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n /** Guided builder model mirroring the current expression. */\n readonly #group = signal<ValidatorConditionGroup>({ connector: '&&', conditions: [] });\n protected readonly group = this.#group.asReadonly();\n\n /** Whether the rule is being edited as a raw expression instead of guided rows. */\n readonly #raw = signal(false);\n protected readonly raw = this.#raw.asReadonly();\n\n /** The live expression text. Mirrors `value[0].expression`. */\n readonly #expression = signal('');\n protected readonly expression = this.#expression.asReadonly();\n\n /** Chosen aggregate per referenced list variable (keyed by variable name). */\n readonly #functions = signal<Record<string, CalculationFunctions>>({});\n\n /**\n * The list this editor last emitted. Used to tell an incoming `value` binding\n * that is genuinely new (a different input opened for editing) from the echo\n * of our own commit — re-seeding on the echo would rebuild the guided model\n * from the serialised text on every keystroke and fight the user's edit.\n */\n #lastCommitted: ConditionalInputRule[] | undefined;\n\n /**\n * Fields the builder can reference: every primary input plus every\n * multiple-input column. `inputId` resolves to the composite id for a sub-row\n * field, which is exactly the key the engine's visibility map uses — the same\n * resolution the validator editor already relies on.\n */\n protected readonly fieldOptions = computed<readonly FieldOption[]>(() => {\n const self = this.mapToData();\n const selfId = self?.id;\n const options: FieldOption[] = [];\n for (const input of this.formInputs()) {\n if (!input.formControlName) continue;\n const group = input.multipleInputInEditId;\n options.push({\n variable: input.formControlName,\n label: input.label || input.formControlName,\n isSelf: input.id === selfId,\n isMultiple: !!group,\n numeric: this.#isNumeric(input),\n inputId: group ? input.id : (input.originalId ?? input.id),\n parentInputId: group,\n });\n }\n return options;\n });\n\n /**\n * Primary (scalar) fields, minus this input itself.\n *\n * A display rule that references its own field can never fire: the engine's\n * self-edge guard resolves the owning input to `undefined` BEFORE the\n * visibility gate (it has to, or evaluating `vis(X)` would recurse into\n * `vis(X)`). Offering it would let an author build a rule that silently never\n * matches, so it is not offered.\n */\n protected readonly directFields = computed<readonly FieldOption[]>(() =>\n this.fieldOptions().filter((f) => !f.isMultiple && !f.isSelf),\n );\n\n /** Multiple-input columns, for the second dropdown group. */\n protected readonly listFields = computed<readonly FieldOption[]>(() =>\n this.fieldOptions().filter((f) => f.isMultiple && !f.isSelf),\n );\n\n /** Field option keyed by its expression variable, for operand lookups. */\n readonly #fieldByVariable = computed<ReadonlyMap<string, FieldOption>>(\n () => new Map(this.fieldOptions().map((f) => [f.variable, f])),\n );\n\n /** Multiple-input columns actually referenced by the current expression. */\n protected readonly referencedListFields = computed<readonly FieldOption[]>(() => {\n const tokens = referencedTokens(this.#expression());\n return this.listFields().filter((f) => tokens.has(f.variable));\n });\n\n /**\n * Multiple-input variables that MUST be aggregated: a list column compared\n * against a non-list operand has to be reduced to a single value. In raw mode\n * operand pairing cannot be analysed, so every referenced list column counts.\n */\n protected readonly requiredAggregateVariables = computed<ReadonlySet<string>>(() => {\n if (this.#raw()) {\n return new Set(this.referencedListFields().map((f) => f.variable));\n }\n const byVariable = this.#fieldByVariable();\n const required = new Set<string>();\n for (const cond of this.#group().conditions) {\n const left = byVariable.get(cond.field);\n const right = cond.compareTo === 'field' ? byVariable.get(cond.value) : undefined;\n const leftMultiple = !!left?.isMultiple;\n const rightMultiple = !!right?.isMultiple;\n if (leftMultiple && !rightMultiple) required.add(cond.field);\n if (rightMultiple && !leftMultiple && right) required.add(right.variable);\n }\n return required;\n });\n\n /** Aggregates offered for a field: numeric columns get all, others only count. */\n protected aggregatesFor(field: FieldOption): readonly AggregateOption[] {\n return field.numeric\n ? this.aggregates\n : this.aggregates.filter((a) => a.value === CalculationFunctions.Count);\n }\n\n /** Whether a referenced list column is required to have an aggregate. */\n protected isAggregateRequired(variable: string): boolean {\n return this.requiredAggregateVariables().has(variable);\n }\n\n /** Human-readable syntax error for the raw editor, or `null` when valid/empty. */\n protected readonly syntaxError = computed<string | null>(() => {\n const expression = this.#expression();\n if (expression.trim() === '') return null;\n try {\n evaluatePredicate(expression, {});\n return null;\n } catch (error: unknown) {\n return error instanceof Error ? error.message : 'The expression syntax is invalid.';\n }\n });\n\n /** Whether the current expression can be edited in the guided builder. */\n protected readonly canUseGuided = computed<boolean>(\n () => parseConditions(this.#expression(), this.#fieldNameSet()) !== null,\n );\n\n /** Whether a rule is in force right now. */\n protected readonly hasRule = computed<boolean>(() => this.#expression().trim() !== '');\n\n /**\n * Whether the guided builder currently holds a condition that will be DROPPED\n * on serialisation — no field chosen, or a field-vs-field comparison with no\n * right-hand field. The template surfaces this as a one-line pending hint,\n * because the alternative is a silently inert rule: the author adds a row,\n * assumes the field is now conditional, and nothing tells them it is not.\n *\n * A typed value of `''` is NOT incomplete — `x === \"\"` is the legitimate\n * \"while the field is empty\" rule.\n */\n protected readonly hasIncompleteCondition = computed<boolean>(() => {\n if (this.#raw()) return false;\n return this.#group().conditions.some(\n (cond) =>\n cond.field.trim() === '' ||\n (cond.compareTo === 'field' && cond.value.trim() === ''),\n );\n });\n\n // MatFormFieldControl reads these as plain getters during its own change\n // detection, so they stay getters rather than `computed()` signals.\n\n get empty(): boolean {\n return !this.#currentRule();\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get errorState(): boolean {\n const ngControlError = this.ngControl?.errors != null;\n const externalError = (this.errors?.length ?? 0) > 0 && this.touched;\n return ngControlError || externalError;\n }\n\n setDescribedByIds(ids: string[]): void {\n this.describedBy = ids.join(' ');\n const el = this.#elementRef.nativeElement;\n const controlElement = el.querySelector('.lib-conditional-display-config__body');\n controlElement?.setAttribute('aria-describedby', this.describedBy);\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 /** Tear down the MFC state stream so subscribers do not leak. */\n ngOnDestroy(): void {\n this.stateChanges.complete();\n }\n\n /**\n * Seeds the guided builder from the bound `value`.\n *\n * Runs in `ngOnChanges`, not from the template and not from a `value` setter,\n * for two reasons:\n *\n * - **Signal writes.** Seeding writes `#group` / `#raw` / `#expression`.\n * Doing that from a template getter throws NG0600 (writing to signals while\n * Angular renders).\n * - **Binding order.** The host template binds `[value]` *before*\n * `[formInputs]`, and parsing an expression into guided rows needs the field\n * list to recognise its variable names. A `value` setter would parse against\n * an empty field set and drop every rule into Advanced mode. `ngOnChanges`\n * runs after the whole binding pass, so both are present.\n */\n ngOnChanges(changes: SimpleChanges): void {\n if (!changes['value']) return;\n if (this.value === this.#lastCommitted) return; // our own echo\n this.#seed();\n }\n\n #seed(): void {\n const rule = this.#currentRule();\n const expression = rule?.expression ?? '';\n this.#expression.set(expression);\n this.#functions.set(this.#functionsFromRule(rule));\n const parsed = parseConditions(expression, this.#fieldNameSet());\n if (parsed) {\n this.#group.set(parsed);\n this.#raw.set(false);\n } else if (expression.trim() !== '') {\n // An expression the guided builder cannot represent (grouping, mixed\n // connectors, negation) opens in Advanced and round-trips unchanged.\n this.#raw.set(true);\n } else {\n this.#group.set({ connector: '&&', conditions: [] });\n this.#raw.set(false);\n }\n }\n\n // ---- guided condition builder ------------------------------------------\n\n /** Switch the All/Any connector joining the conditions. */\n protected setConnector(connector: '&&' | '||'): void {\n this.#applyGroup({ ...this.#group(), connector });\n }\n\n /**\n * Append a fresh, **field-less** condition.\n *\n * The validator editor defaults the field to the input being validated, which\n * is nearly always what its author wants. Here the owning field is explicitly\n * excluded (a rule cannot observe itself), so any default would be an\n * arbitrary pick — and it would not be inert. `serializeConditions` treats a\n * typed value of `''` as complete, because `x === \"\"` is a legitimate \"is\n * empty\" rule, so a pre-filled field would turn a single click on \"Add\n * condition\" into a live rule that starts hiding the field. Leaving the field\n * unset serialises to nothing, so the rule only exists once the author has\n * actually said what it is about.\n */\n protected addCondition(): void {\n const group = this.#group();\n this.#applyGroup({\n ...group,\n conditions: [...group.conditions, emptyCondition('')],\n });\n }\n\n /** Apply a partial change to the condition at `index`. */\n protected updateCondition(index: number, patch: Partial<ValidatorCondition>): void {\n const group = this.#group();\n const conditions = group.conditions.map((c, i) => (i === index ? { ...c, ...patch } : c));\n this.#applyGroup({ ...group, conditions });\n }\n\n /** Flip a condition between comparing to a typed value and another field. */\n protected toggleCompareTo(index: number): void {\n const condition = this.#group().conditions[index];\n if (!condition) return;\n if (condition.compareTo === 'value') {\n const field = this.fieldOptions().find((f) => f.variable !== condition.field && !f.isSelf);\n this.updateCondition(index, { compareTo: 'field', value: field?.variable ?? '' });\n } else {\n this.updateCondition(index, { compareTo: 'value', value: '' });\n }\n }\n\n /** Remove the condition at `index`. */\n protected removeCondition(index: number): void {\n const group = this.#group();\n this.#applyGroup({ ...group, conditions: group.conditions.filter((_, i) => i !== index) });\n }\n\n /**\n * Choose (or clear, by re-clicking) the aggregate that reduces a referenced\n * list field to a single value.\n */\n protected setFunction(variable: string, fn: CalculationFunctions): void {\n this.#functions.update((current) => {\n const next = { ...current };\n if (next[variable] === fn) {\n delete next[variable];\n } else {\n next[variable] = fn;\n }\n return next;\n });\n // The expression text is unchanged, but the observed deps now carry the\n // aggregate — re-commit so inputsObservedForChanges reflects the choice.\n this.#commitExpression(this.#expression());\n }\n\n /** The aggregate currently chosen for a list variable, if any. */\n protected currentFunction(variable: string): CalculationFunctions | undefined {\n return this.#functions()[variable];\n }\n\n /** Replace the raw expression as the user types. */\n protected onExpressionInput(event: Event): void {\n this.#commitExpression((event.target as HTMLTextAreaElement).value);\n }\n\n /** Switch to the raw expression editor. */\n protected useRaw(): void {\n this.#raw.set(true);\n }\n\n /** Switch back to the guided builder, reparsing the current expression. */\n protected useGuided(): void {\n const parsed = parseConditions(this.#expression(), this.#fieldNameSet());\n if (!parsed) return;\n this.#group.set(parsed);\n this.#raw.set(false);\n }\n\n /**\n * Remove the rule entirely — the field becomes unconditionally visible again.\n *\n * Commits an empty array rather than a rule with a blank expression, so the\n * engine builds no visibility signal at all for this input and the form pays\n * nothing for a rule that no longer exists.\n */\n protected clearRule(): void {\n this.#group.set({ connector: '&&', conditions: [] });\n this.#functions.set({});\n this.#expression.set('');\n this.#raw.set(false);\n this.#commit([]);\n }\n\n /** Read the value-event target as a string. */\n protected inputValue(event: Event): string {\n return (event.target as HTMLInputElement | HTMLSelectElement).value;\n }\n\n // ---- internal ----------------------------------------------------------\n\n /** The single rule this editor owns, if one is bound. */\n #currentRule(): ConditionalInputRule | undefined {\n return this.value?.[0];\n }\n\n /** Set of field variable names the builder recognises (for parsing). */\n #fieldNameSet(): ReadonlySet<string> {\n return new Set(this.fieldOptions().map((f) => f.variable));\n }\n\n /** Whether an input carries a numeric data type. */\n #isNumeric(input: FormColumnInputs): boolean {\n return input.dataType === InputDataTypes.Number || input.type === InputTypes.Number;\n }\n\n /** Recover the per-variable aggregate choices from a rule's observed inputs. */\n #functionsFromRule(rule: ConditionalInputRule | undefined): Record<string, CalculationFunctions> {\n const map: Record<string, CalculationFunctions> = {};\n for (const observed of rule?.inputsObservedForChanges ?? []) {\n if (observed.function) map[observed.variable] = observed.function;\n }\n return map;\n }\n\n /** Store a builder change: update the model, then serialise + commit. */\n #applyGroup(next: ValidatorConditionGroup): void {\n this.#group.set(next);\n this.#commitExpression(serializeConditions(next));\n }\n\n /**\n * Write an expression onto the rule, re-deriving its observed-input deps.\n *\n * An expression that serialises to nothing means the author has not finished —\n * commit an empty list so the engine treats the input as unconditional. A\n * half-built rule must never hide the field it is being written on.\n */\n #commitExpression(expression: string): void {\n this.#expression.set(expression);\n if (expression.trim() === '') {\n this.#commit([]);\n return;\n }\n const fields: readonly FieldBinding[] = this.fieldOptions();\n const existing = this.#currentRule();\n const rule: ConditionalInputRule = {\n // Preserve every legacy descriptive field an older form may carry; the\n // engine ignores them, but an external consumer still renders them.\n ...existing,\n id: existing?.id ?? uuidv4(),\n expression,\n inputsObservedForChanges: deriveObservedInputs(expression, fields, this.#functions()),\n };\n this.#commit([rule]);\n }\n\n /** Single mutation path: store the new list and notify the parent. */\n #commit(next: ConditionalInputRule[]): void {\n this.#lastCommitted = next;\n this.value = next;\n this.markAsTouched();\n this.stateChanges.next();\n this.valueChanged.emit([...next]);\n }\n}\n","<section class=\"lib-conditional-display-config__body\">\n @if (!hasRule()) {\n <p class=\"lib-conditional-display-config__hint\">\n Appears only while a condition you define is true. Leave empty to always show.\n </p>\n }\n\n <div class=\"lib-conditional-display-config__condition-head\">\n <span class=\"lib-conditional-display-config__f-label\">Show this field when</span>\n @if (!raw() && group().conditions.length > 1) {\n <mat-button-toggle-group\n class=\"lib-conditional-display-config__seg\"\n [value]=\"group().connector\"\n hideSingleSelectionIndicator\n (change)=\"setConnector($event.value)\"\n aria-label=\"Combine conditions\"\n >\n <mat-button-toggle value=\"&&\">All</mat-button-toggle>\n <mat-button-toggle value=\"||\">Any</mat-button-toggle>\n </mat-button-toggle-group>\n }\n </div>\n\n @if (raw()) {\n <textarea\n class=\"lib-conditional-display-config__control lib-conditional-display-config__textarea lib-conditional-display-config__mono\"\n rows=\"2\"\n [value]=\"expression()\"\n [disabled]=\"disabled\"\n (input)=\"onExpressionInput($event)\"\n aria-label=\"Visibility expression\"\n placeholder='e.g. contactMethod === \"phone\"'\n ></textarea>\n @if (syntaxError(); as error) {\n <p class=\"lib-conditional-display-config__error\">\n <mat-icon class=\"lib-conditional-display-config__error-icon\">error_outline</mat-icon>\n <span>{{ error }}</span>\n </p>\n } @else {\n <p class=\"lib-conditional-display-config__sub-hint\">\n True = shown. Use field names with <code>===</code>, <code>></code>, <code>includes</code> …\n </p>\n }\n } @else {\n\n @if (fieldOptions().length === 0) {\n <p class=\"lib-conditional-display-config__sub-hint\">\n No other fields available yet — switch to Advanced to type an expression.\n </p>\n }\n\n @for (cond of group().conditions; track $index; let first = $first) {\n @if (!first) {\n <span class=\"lib-conditional-display-config__connector\" aria-hidden=\"true\">\n {{ group().connector === '&&' ? 'and' : 'or' }}\n </span>\n }\n <div class=\"lib-conditional-display-config__cond\">\n <label class=\"lib-conditional-display-config__field\">\n <span class=\"lib-conditional-display-config__f-label\">Field</span>\n <select\n class=\"lib-conditional-display-config__control\"\n [class.lib-conditional-display-config__control--invalid]=\"!cond.field\"\n [disabled]=\"disabled\"\n (change)=\"updateCondition($index, { field: inputValue($event) })\"\n >\n <option value=\"\" disabled [selected]=\"!cond.field\">Choose…</option>\n @if (directFields().length) {\n <optgroup label=\"Fields\">\n @for (f of directFields(); track f.variable) {\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.field\">{{ f.label }}</option>\n }\n </optgroup>\n }\n @if (listFields().length) {\n <optgroup label=\"List fields\">\n @for (f of listFields(); track f.variable) {\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.field\">{{ f.label }}</option>\n }\n </optgroup>\n }\n </select>\n </label>\n\n <label class=\"lib-conditional-display-config__field\">\n <span class=\"lib-conditional-display-config__f-label\">Condition</span>\n <select\n class=\"lib-conditional-display-config__control\"\n [disabled]=\"disabled\"\n (change)=\"updateCondition($index, { operator: inputValue($event) })\"\n >\n @for (op of operators; track op.value) {\n <option [value]=\"op.value\" [selected]=\"op.value === cond.operator\">{{ op.label }}</option>\n }\n </select>\n </label>\n\n <div class=\"lib-conditional-display-config__field lib-conditional-display-config__field--value\">\n <span class=\"lib-conditional-display-config__f-label\">\n {{ cond.compareTo === 'field' ? 'Other field' : 'Value' }}\n </span>\n <div class=\"lib-conditional-display-config__value\">\n @if (cond.compareTo === 'field') {\n <select\n class=\"lib-conditional-display-config__control\"\n [class.lib-conditional-display-config__control--invalid]=\"!cond.value\"\n [disabled]=\"disabled\"\n (change)=\"updateCondition($index, { value: inputValue($event) })\"\n >\n <option value=\"\" disabled [selected]=\"!cond.value\">Choose…</option>\n @if (directFields().length) {\n <optgroup label=\"Fields\">\n @for (f of directFields(); track f.variable) {\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.value\">{{ f.label }}</option>\n }\n </optgroup>\n }\n @if (listFields().length) {\n <optgroup label=\"List fields\">\n @for (f of listFields(); track f.variable) {\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.value\">{{ f.label }}</option>\n }\n </optgroup>\n }\n </select>\n } @else {\n <input\n class=\"lib-conditional-display-config__control\"\n [value]=\"cond.value\"\n [disabled]=\"disabled\"\n (input)=\"updateCondition($index, { value: inputValue($event) })\"\n placeholder=\"leave empty for “is empty”\"\n />\n }\n <button\n type=\"button\"\n class=\"lib-conditional-display-config__icon-btn\"\n [disabled]=\"disabled\"\n (click)=\"toggleCompareTo($index)\"\n [attr.aria-label]=\"\n cond.compareTo === 'field' ? 'Compare to a typed value' : 'Compare to another field'\n \"\n [matTooltip]=\"\n cond.compareTo === 'field' ? 'Compare to a typed value' : 'Compare to another field'\n \"\n >\n <mat-icon>{{ cond.compareTo === 'field' ? 'edit' : 'link' }}</mat-icon>\n </button>\n <button\n type=\"button\"\n class=\"lib-conditional-display-config__icon-btn\"\n [disabled]=\"disabled\"\n (click)=\"removeCondition($index)\"\n matTooltip=\"Remove condition\"\n aria-label=\"Remove condition\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </div>\n </div>\n </div>\n }\n\n <button\n type=\"button\"\n class=\"lib-conditional-display-config__link\"\n [disabled]=\"disabled\"\n (click)=\"addCondition()\"\n >\n <mat-icon>add</mat-icon> Add condition\n </button>\n }\n\n @if (hasIncompleteCondition()) {\n <p class=\"lib-conditional-display-config__sub-hint lib-conditional-display-config__sub-hint--pending\">\n <mat-icon class=\"lib-conditional-display-config__pending-icon\">pending</mat-icon>\n <span>Unfinished conditions are ignored — pick a field to activate the rule.</span>\n </p>\n }\n\n @if (referencedListFields().length) {\n <div class=\"lib-conditional-display-config__lists\">\n <span class=\"lib-conditional-display-config__f-label\">Combine each list</span>\n @for (f of referencedListFields(); track f.variable) {\n <div\n class=\"lib-conditional-display-config__list-row\"\n [class.lib-conditional-display-config__list-row--unset]=\"\n isAggregateRequired(f.variable) && !currentFunction(f.variable)\n \"\n >\n <span class=\"lib-conditional-display-config__list-name\">{{ f.label }}</span>\n <div class=\"lib-conditional-display-config__agg\" role=\"group\" [attr.aria-label]=\"'Combine ' + f.label\">\n @for (agg of aggregatesFor(f); track agg.value) {\n <button\n type=\"button\"\n class=\"lib-conditional-display-config__agg-chip\"\n [class.lib-conditional-display-config__agg-chip--on]=\"currentFunction(f.variable) === agg.value\"\n [disabled]=\"disabled\"\n (click)=\"setFunction(f.variable, agg.value)\"\n >\n {{ agg.label }}\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n\n @if (hasRule()) {\n <p class=\"lib-conditional-display-config__summary\">\n While hidden, this field is removed from the form — nothing is submitted and\n its validation cannot block.\n </p>\n\n @if (!raw()) {\n <details class=\"lib-conditional-display-config__preview\">\n <summary class=\"lib-conditional-display-config__preview-summary\">Expression</summary>\n <code>{{ expression() }}</code>\n </details>\n }\n }\n\n <div class=\"lib-conditional-display-config__foot\">\n @if (raw()) {\n <button\n type=\"button\"\n class=\"lib-conditional-display-config__link\"\n [disabled]=\"!canUseGuided()\"\n [matTooltip]=\"canUseGuided() ? '' : 'This expression is too advanced for the guided builder'\"\n (click)=\"useGuided()\"\n >\n <mat-icon>view_module</mat-icon> Guided\n </button>\n } @else {\n <button type=\"button\" class=\"lib-conditional-display-config__link\" (click)=\"useRaw()\">\n <mat-icon>code</mat-icon> Advanced\n </button>\n }\n\n @if (hasRule()) {\n <button\n type=\"button\"\n class=\"lib-conditional-display-config__link lib-conditional-display-config__link--danger\"\n [disabled]=\"disabled\"\n matTooltip=\"Remove the rule — the field becomes always visible\"\n (click)=\"clearRule()\"\n >\n <mat-icon>visibility</mat-icon> Always show\n </button>\n }\n </div>\n</section>\n"],"names":["uuidv4","i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;AAkEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CG;MAqBU,iCAAiC,CAAA;AApB9C,IAAA,WAAA,GAAA;;AAyBW,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QAClC,IAAA,CAAA,WAAW,GAAG,gCAAgC;AAEvD,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,+BAAA,EAAkC,iCAAiC,CAAC,MAAM,EAAE,EAAE;QACnF,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,GAAwB,SAAS;QAC3C,IAAA,CAAA,mBAAmB,GAAuB,SAAS;QACnD,IAAA,CAAA,wBAAwB,GAAwB,SAAS;;QAGhD,IAAA,CAAA,QAAQ,GAAG,KAAK;;QAEhB,IAAA,CAAA,KAAK,GAA2B,EAAE;;QAElC,IAAA,CAAA,MAAM,GAAsC,EAAE;;AAG9C,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAA+B,SAAS,gFAAC;;AAE1D,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAA0B,EAAE,iFAAC;;QAG/C,IAAA,CAAA,YAAY,GAAG,MAAM,EAA0B;;QAGrC,IAAA,CAAA,SAAS,GAAG,mBAAmB;;AAG/B,QAAA,IAAA,CAAA,UAAU,GAA+B;Y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CAAC,EAAA,IAAA,EACvF;AACJ,wBAAA,OAAO,EAAE,gCAAgC;AACzC,wBAAA,WAAW,EAAE,IAAI;AAClB,qBAAA,EAAA,QAAA,EAAA,44SAAA,EAAA,MAAA,EAAA,CAAA,igNAAA,CAAA,EAAA;;sBAqBA;;sBAEA;;sBAEA;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-conditional-display-config.component-DIMIWTKj.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/conditional-display-config/conditional-display-config.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/conditional-display-config/conditional-display-config.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n type OnChanges,\n type OnDestroy,\n type SimpleChanges,\n ViewEncapsulation,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport { v4 as uuidv4 } from 'uuid';\n\nimport type { ConditionalInputRule, FormColumnInputs } from 'ngx-t-forms-types';\nimport { CalculationFunctions, InputDataTypes, InputTypes } from 'ngx-t-forms-types';\n\nimport { CommonModule } from '@angular/common';\nimport { NgControl } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { Subject } from 'rxjs';\n\nimport { evaluatePredicate } from '../../../../shared/functions/array-access/predicate-dsl';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\nimport {\n type FieldBinding,\n PREDICATE_OPERATORS,\n type ValidatorCondition,\n type ValidatorConditionGroup,\n deriveObservedInputs,\n emptyCondition,\n parseConditions,\n referencedTokens,\n serializeConditions,\n} from '../validators-config/validator-condition';\n\n/** A selectable field in the condition builder's field/value dropdowns. */\ninterface FieldOption {\n readonly variable: string;\n readonly label: string;\n readonly isSelf: boolean;\n /** A multiple-input column (lives inside a repeatable group). */\n readonly isMultiple: boolean;\n /** Whether the field holds a numeric value (gates numeric aggregates). */\n readonly numeric: boolean;\n /** The input read at runtime: a primary input id, or a list sub-item id. */\n readonly inputId: string;\n /** Row-array container id, for multiple-input columns. */\n readonly parentInputId?: string;\n}\n\n/** A friendly aggregate choice shown for a referenced list field. */\ninterface AggregateOption {\n readonly value: CalculationFunctions;\n readonly label: string;\n}\n\n/**\n * Internal editor implementing `MatFormFieldControl<ConditionalInputRule[]>` for\n * authoring a form input's **conditional display** rule.\n *\n * ### Relationship to `validators-config`\n *\n * This is `validators-config` minus `message` and `canOverride`, and minus the\n * multi-rule chip list. It reuses that editor's condition model verbatim —\n * `parseConditions` / `serializeConditions` / `emptyCondition` /\n * `deriveObservedInputs` / `PREDICATE_OPERATORS` — so an author who has written\n * a validator already knows how to write a display rule, and the engine reads\n * both through the same `readDep` dependency model.\n *\n * The one thing that differs is **polarity**, and the copy in the template leans\n * on it hard because getting it backwards is the obvious authoring mistake:\n *\n * | | Expression `true` means |\n * |---|---|\n * | a validator | the entry is **invalid** |\n * | a display rule | the field is **shown** |\n *\n * ### Why exactly one rule\n *\n * `conditionalInputConfig` is an array, and the engine combines multiple rules\n * with AND. This editor deliberately authors a **single** rule: the guided\n * builder already composes many conditions with All/Any inside one expression,\n * so a second rule would add a second, less visible combination layer that means\n * something subtly different. Keeping it to one makes the AND-across-rules\n * semantics unreachable through the UI — it exists only for hand-authored\n * configuration.\n *\n * ### Committing\n *\n * Unlike the validator editor there is no draft/Save cycle: with one rule and no\n * message to compose, every change commits immediately. A half-built condition\n * serialises to an empty expression, which the engine treats as *no rule* — so\n * an incomplete edit leaves the field visible rather than making it vanish\n * mid-authoring.\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-conditional-display-config',\n templateUrl: './conditional-display-config.component.html',\n styleUrls: ['./conditional-display-config.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n MatButtonToggleModule,\n MatCardModule,\n MatTooltipModule,\n ],\n providers: [{ provide: MatFormFieldControl, useExisting: ConditionalDisplayConfigComponent }],\n host: {\n 'class': 'lib-conditional-display-config',\n '[attr.id]': 'id',\n },\n})\nexport class ConditionalDisplayConfigComponent\n implements MatFormFieldControl<ConditionalInputRule[]>, OnChanges, OnDestroy {\n static nextId = 0;\n\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'lib-conditional-display-config';\n\n id = `lib-conditional-display-config-${ConditionalDisplayConfigComponent.nextId++}`;\n placeholder = '';\n focused = false;\n touched = false;\n required = false;\n describedBy = '';\n autofilled: boolean | undefined = undefined;\n userAriaDescribedBy: string | undefined = undefined;\n disableAutomaticLabeling: boolean | undefined = undefined;\n\n /** Whether the editor is inert. Kept as `@Input()` for the MFC contract. */\n @Input() disabled = false;\n /** Current rule list. Kept as `@Input()` for the MFC contract. */\n @Input() value: ConditionalInputRule[] = [];\n /** Validation errors surfaced by the parent for error-state derivation. */\n @Input() errors: IConfigElementError[] | undefined = [];\n\n /** The input that owns this rule (for multiple-input scopes + self-labelling). */\n readonly mapToData = input<FormColumnInputs | undefined>(undefined);\n /** Available form inputs offered as variables. */\n readonly formInputs = input<Array<FormColumnInputs>>([]);\n\n /** Emits the full rule list whenever it changes. */\n readonly valueChanged = output<ConditionalInputRule[]>();\n\n /** Operator choices shared with the validator + array-access builders. */\n protected readonly operators = PREDICATE_OPERATORS;\n\n /** Aggregate choices for a list field, with non-technical labels. */\n protected readonly aggregates: readonly AggregateOption[] = [\n { value: CalculationFunctions.Sum, label: 'total' },\n { value: CalculationFunctions.Avg, label: 'average' },\n { value: CalculationFunctions.Min, label: 'lowest' },\n { value: CalculationFunctions.Max, label: 'highest' },\n { value: CalculationFunctions.Count, label: 'count' },\n ];\n\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n /** Guided builder model mirroring the current expression. */\n readonly #group = signal<ValidatorConditionGroup>({ connector: '&&', conditions: [] });\n protected readonly group = this.#group.asReadonly();\n\n /** Whether the rule is being edited as a raw expression instead of guided rows. */\n readonly #raw = signal(false);\n protected readonly raw = this.#raw.asReadonly();\n\n /** The live expression text. Mirrors `value[0].expression`. */\n readonly #expression = signal('');\n protected readonly expression = this.#expression.asReadonly();\n\n /** Chosen aggregate per referenced list variable (keyed by variable name). */\n readonly #functions = signal<Record<string, CalculationFunctions>>({});\n\n /**\n * The list this editor last emitted. Used to tell an incoming `value` binding\n * that is genuinely new (a different input opened for editing) from the echo\n * of our own commit — re-seeding on the echo would rebuild the guided model\n * from the serialised text on every keystroke and fight the user's edit.\n */\n #lastCommitted: ConditionalInputRule[] | undefined;\n\n /**\n * Fields the builder can reference: every primary input plus every\n * multiple-input column. `inputId` resolves to the composite id for a sub-row\n * field, which is exactly the key the engine's visibility map uses — the same\n * resolution the validator editor already relies on.\n */\n protected readonly fieldOptions = computed<readonly FieldOption[]>(() => {\n const self = this.mapToData();\n const selfId = self?.id;\n const options: FieldOption[] = [];\n for (const input of this.formInputs()) {\n if (!input.formControlName) continue;\n const group = input.multipleInputInEditId;\n options.push({\n variable: input.formControlName,\n label: input.label || input.formControlName,\n isSelf: input.id === selfId,\n isMultiple: !!group,\n numeric: this.#isNumeric(input),\n inputId: group ? input.id : (input.originalId ?? input.id),\n parentInputId: group,\n });\n }\n return options;\n });\n\n /**\n * Primary (scalar) fields, minus this input itself.\n *\n * A display rule that references its own field can never fire: the engine's\n * self-edge guard resolves the owning input to `undefined` BEFORE the\n * visibility gate (it has to, or evaluating `vis(X)` would recurse into\n * `vis(X)`). Offering it would let an author build a rule that silently never\n * matches, so it is not offered.\n */\n protected readonly directFields = computed<readonly FieldOption[]>(() =>\n this.fieldOptions().filter((f) => !f.isMultiple && !f.isSelf),\n );\n\n /** Multiple-input columns, for the second dropdown group. */\n protected readonly listFields = computed<readonly FieldOption[]>(() =>\n this.fieldOptions().filter((f) => f.isMultiple && !f.isSelf),\n );\n\n /** Field option keyed by its expression variable, for operand lookups. */\n readonly #fieldByVariable = computed<ReadonlyMap<string, FieldOption>>(\n () => new Map(this.fieldOptions().map((f) => [f.variable, f])),\n );\n\n /** Multiple-input columns actually referenced by the current expression. */\n protected readonly referencedListFields = computed<readonly FieldOption[]>(() => {\n const tokens = referencedTokens(this.#expression());\n return this.listFields().filter((f) => tokens.has(f.variable));\n });\n\n /**\n * Multiple-input variables that MUST be aggregated: a list column compared\n * against a non-list operand has to be reduced to a single value. In raw mode\n * operand pairing cannot be analysed, so every referenced list column counts.\n */\n protected readonly requiredAggregateVariables = computed<ReadonlySet<string>>(() => {\n if (this.#raw()) {\n return new Set(this.referencedListFields().map((f) => f.variable));\n }\n const byVariable = this.#fieldByVariable();\n const required = new Set<string>();\n for (const cond of this.#group().conditions) {\n const left = byVariable.get(cond.field);\n const right = cond.compareTo === 'field' ? byVariable.get(cond.value) : undefined;\n const leftMultiple = !!left?.isMultiple;\n const rightMultiple = !!right?.isMultiple;\n if (leftMultiple && !rightMultiple) required.add(cond.field);\n if (rightMultiple && !leftMultiple && right) required.add(right.variable);\n }\n return required;\n });\n\n /** Aggregates offered for a field: numeric columns get all, others only count. */\n protected aggregatesFor(field: FieldOption): readonly AggregateOption[] {\n return field.numeric\n ? this.aggregates\n : this.aggregates.filter((a) => a.value === CalculationFunctions.Count);\n }\n\n /** Whether a referenced list column is required to have an aggregate. */\n protected isAggregateRequired(variable: string): boolean {\n return this.requiredAggregateVariables().has(variable);\n }\n\n /** Human-readable syntax error for the raw editor, or `null` when valid/empty. */\n protected readonly syntaxError = computed<string | null>(() => {\n const expression = this.#expression();\n if (expression.trim() === '') return null;\n try {\n evaluatePredicate(expression, {});\n return null;\n } catch (error: unknown) {\n return error instanceof Error ? error.message : 'The expression syntax is invalid.';\n }\n });\n\n /** Whether the current expression can be edited in the guided builder. */\n protected readonly canUseGuided = computed<boolean>(\n () => parseConditions(this.#expression(), this.#fieldNameSet()) !== null,\n );\n\n /** Whether a rule is in force right now. */\n protected readonly hasRule = computed<boolean>(() => this.#expression().trim() !== '');\n\n /**\n * Whether the guided builder currently holds a condition that will be DROPPED\n * on serialisation — no field chosen, or a field-vs-field comparison with no\n * right-hand field. The template surfaces this as a one-line pending hint,\n * because the alternative is a silently inert rule: the author adds a row,\n * assumes the field is now conditional, and nothing tells them it is not.\n *\n * A typed value of `''` is NOT incomplete — `x === \"\"` is the legitimate\n * \"while the field is empty\" rule.\n */\n protected readonly hasIncompleteCondition = computed<boolean>(() => {\n if (this.#raw()) return false;\n return this.#group().conditions.some(\n (cond) =>\n cond.field.trim() === '' ||\n (cond.compareTo === 'field' && cond.value.trim() === ''),\n );\n });\n\n // MatFormFieldControl reads these as plain getters during its own change\n // detection, so they stay getters rather than `computed()` signals.\n\n get empty(): boolean {\n return !this.#currentRule();\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get errorState(): boolean {\n const ngControlError = this.ngControl?.errors != null;\n const externalError = (this.errors?.length ?? 0) > 0 && this.touched;\n return ngControlError || externalError;\n }\n\n setDescribedByIds(ids: string[]): void {\n this.describedBy = ids.join(' ');\n const el = this.#elementRef.nativeElement;\n const controlElement = el.querySelector('.lib-conditional-display-config__body');\n controlElement?.setAttribute('aria-describedby', this.describedBy);\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 /** Tear down the MFC state stream so subscribers do not leak. */\n ngOnDestroy(): void {\n this.stateChanges.complete();\n }\n\n /**\n * Seeds the guided builder from the bound `value`.\n *\n * Runs in `ngOnChanges`, not from the template and not from a `value` setter,\n * for two reasons:\n *\n * - **Signal writes.** Seeding writes `#group` / `#raw` / `#expression`.\n * Doing that from a template getter throws NG0600 (writing to signals while\n * Angular renders).\n * - **Binding order.** The host template binds `[value]` *before*\n * `[formInputs]`, and parsing an expression into guided rows needs the field\n * list to recognise its variable names. A `value` setter would parse against\n * an empty field set and drop every rule into Advanced mode. `ngOnChanges`\n * runs after the whole binding pass, so both are present.\n */\n ngOnChanges(changes: SimpleChanges): void {\n if (!changes['value']) return;\n if (this.value === this.#lastCommitted) return; // our own echo\n this.#seed();\n }\n\n #seed(): void {\n const rule = this.#currentRule();\n const expression = rule?.expression ?? '';\n this.#expression.set(expression);\n this.#functions.set(this.#functionsFromRule(rule));\n const parsed = parseConditions(expression, this.#fieldNameSet());\n if (parsed) {\n this.#group.set(parsed);\n this.#raw.set(false);\n } else if (expression.trim() !== '') {\n // An expression the guided builder cannot represent (grouping, mixed\n // connectors, negation) opens in Advanced and round-trips unchanged.\n this.#raw.set(true);\n } else {\n this.#group.set({ connector: '&&', conditions: [] });\n this.#raw.set(false);\n }\n }\n\n // ---- guided condition builder ------------------------------------------\n\n /** Switch the All/Any connector joining the conditions. */\n protected setConnector(connector: '&&' | '||'): void {\n this.#applyGroup({ ...this.#group(), connector });\n }\n\n /**\n * Append a fresh, **field-less** condition.\n *\n * The validator editor defaults the field to the input being validated, which\n * is nearly always what its author wants. Here the owning field is explicitly\n * excluded (a rule cannot observe itself), so any default would be an\n * arbitrary pick — and it would not be inert. `serializeConditions` treats a\n * typed value of `''` as complete, because `x === \"\"` is a legitimate \"is\n * empty\" rule, so a pre-filled field would turn a single click on \"Add\n * condition\" into a live rule that starts hiding the field. Leaving the field\n * unset serialises to nothing, so the rule only exists once the author has\n * actually said what it is about.\n */\n protected addCondition(): void {\n const group = this.#group();\n this.#applyGroup({\n ...group,\n conditions: [...group.conditions, emptyCondition('')],\n });\n }\n\n /** Apply a partial change to the condition at `index`. */\n protected updateCondition(index: number, patch: Partial<ValidatorCondition>): void {\n const group = this.#group();\n const conditions = group.conditions.map((c, i) => (i === index ? { ...c, ...patch } : c));\n this.#applyGroup({ ...group, conditions });\n }\n\n /** Flip a condition between comparing to a typed value and another field. */\n protected toggleCompareTo(index: number): void {\n const condition = this.#group().conditions[index];\n if (!condition) return;\n if (condition.compareTo === 'value') {\n const field = this.fieldOptions().find((f) => f.variable !== condition.field && !f.isSelf);\n this.updateCondition(index, { compareTo: 'field', value: field?.variable ?? '' });\n } else {\n this.updateCondition(index, { compareTo: 'value', value: '' });\n }\n }\n\n /** Remove the condition at `index`. */\n protected removeCondition(index: number): void {\n const group = this.#group();\n this.#applyGroup({ ...group, conditions: group.conditions.filter((_, i) => i !== index) });\n }\n\n /**\n * Choose (or clear, by re-clicking) the aggregate that reduces a referenced\n * list field to a single value.\n */\n protected setFunction(variable: string, fn: CalculationFunctions): void {\n this.#functions.update((current) => {\n const next = { ...current };\n if (next[variable] === fn) {\n delete next[variable];\n } else {\n next[variable] = fn;\n }\n return next;\n });\n // The expression text is unchanged, but the observed deps now carry the\n // aggregate — re-commit so inputsObservedForChanges reflects the choice.\n this.#commitExpression(this.#expression());\n }\n\n /** The aggregate currently chosen for a list variable, if any. */\n protected currentFunction(variable: string): CalculationFunctions | undefined {\n return this.#functions()[variable];\n }\n\n /** Replace the raw expression as the user types. */\n protected onExpressionInput(event: Event): void {\n this.#commitExpression((event.target as HTMLTextAreaElement).value);\n }\n\n /** Switch to the raw expression editor. */\n protected useRaw(): void {\n this.#raw.set(true);\n }\n\n /** Switch back to the guided builder, reparsing the current expression. */\n protected useGuided(): void {\n const parsed = parseConditions(this.#expression(), this.#fieldNameSet());\n if (!parsed) return;\n this.#group.set(parsed);\n this.#raw.set(false);\n }\n\n /**\n * Remove the rule entirely — the field becomes unconditionally visible again.\n *\n * Commits an empty array rather than a rule with a blank expression, so the\n * engine builds no visibility signal at all for this input and the form pays\n * nothing for a rule that no longer exists.\n */\n protected clearRule(): void {\n this.#group.set({ connector: '&&', conditions: [] });\n this.#functions.set({});\n this.#expression.set('');\n this.#raw.set(false);\n this.#commit([]);\n }\n\n /** Read the value-event target as a string. */\n protected inputValue(event: Event): string {\n return (event.target as HTMLInputElement | HTMLSelectElement).value;\n }\n\n // ---- internal ----------------------------------------------------------\n\n /** The single rule this editor owns, if one is bound. */\n #currentRule(): ConditionalInputRule | undefined {\n return this.value?.[0];\n }\n\n /** Set of field variable names the builder recognises (for parsing). */\n #fieldNameSet(): ReadonlySet<string> {\n return new Set(this.fieldOptions().map((f) => f.variable));\n }\n\n /** Whether an input carries a numeric data type. */\n #isNumeric(input: FormColumnInputs): boolean {\n return input.dataType === InputDataTypes.Number || input.type === InputTypes.Number;\n }\n\n /** Recover the per-variable aggregate choices from a rule's observed inputs. */\n #functionsFromRule(rule: ConditionalInputRule | undefined): Record<string, CalculationFunctions> {\n const map: Record<string, CalculationFunctions> = {};\n for (const observed of rule?.inputsObservedForChanges ?? []) {\n if (observed.function) map[observed.variable] = observed.function;\n }\n return map;\n }\n\n /** Store a builder change: update the model, then serialise + commit. */\n #applyGroup(next: ValidatorConditionGroup): void {\n this.#group.set(next);\n this.#commitExpression(serializeConditions(next));\n }\n\n /**\n * Write an expression onto the rule, re-deriving its observed-input deps.\n *\n * An expression that serialises to nothing means the author has not finished —\n * commit an empty list so the engine treats the input as unconditional. A\n * half-built rule must never hide the field it is being written on.\n */\n #commitExpression(expression: string): void {\n this.#expression.set(expression);\n if (expression.trim() === '') {\n this.#commit([]);\n return;\n }\n const fields: readonly FieldBinding[] = this.fieldOptions();\n const existing = this.#currentRule();\n const rule: ConditionalInputRule = {\n // Preserve every legacy descriptive field an older form may carry; the\n // engine ignores them, but an external consumer still renders them.\n ...existing,\n id: existing?.id ?? uuidv4(),\n expression,\n inputsObservedForChanges: deriveObservedInputs(expression, fields, this.#functions()),\n };\n this.#commit([rule]);\n }\n\n /** Single mutation path: store the new list and notify the parent. */\n #commit(next: ConditionalInputRule[]): void {\n this.#lastCommitted = next;\n this.value = next;\n this.markAsTouched();\n this.stateChanges.next();\n this.valueChanged.emit([...next]);\n }\n}\n","<section class=\"lib-conditional-display-config__body\">\n @if (!hasRule()) {\n <p class=\"lib-conditional-display-config__hint\">\n Appears only while a condition you define is true. Leave empty to always show.\n </p>\n }\n\n <div class=\"lib-conditional-display-config__condition-head\">\n <span class=\"lib-conditional-display-config__f-label\">Show this field when</span>\n @if (!raw() && group().conditions.length > 1) {\n <mat-button-toggle-group\n class=\"lib-conditional-display-config__seg\"\n [value]=\"group().connector\"\n hideSingleSelectionIndicator\n (change)=\"setConnector($event.value)\"\n aria-label=\"Combine conditions\"\n >\n <mat-button-toggle value=\"&&\">All</mat-button-toggle>\n <mat-button-toggle value=\"||\">Any</mat-button-toggle>\n </mat-button-toggle-group>\n }\n </div>\n\n @if (raw()) {\n <textarea\n class=\"lib-conditional-display-config__control lib-conditional-display-config__textarea lib-conditional-display-config__mono\"\n rows=\"2\"\n [value]=\"expression()\"\n [disabled]=\"disabled\"\n (input)=\"onExpressionInput($event)\"\n aria-label=\"Visibility expression\"\n placeholder='e.g. contactMethod === \"phone\"'\n ></textarea>\n @if (syntaxError(); as error) {\n <p class=\"lib-conditional-display-config__error\">\n <mat-icon class=\"lib-conditional-display-config__error-icon\">error_outline</mat-icon>\n <span>{{ error }}</span>\n </p>\n } @else {\n <p class=\"lib-conditional-display-config__sub-hint\">\n True = shown. Use field names with <code>===</code>, <code>></code>, <code>includes</code> …\n </p>\n }\n } @else {\n\n @if (fieldOptions().length === 0) {\n <p class=\"lib-conditional-display-config__sub-hint\">\n No other fields available yet — switch to Advanced to type an expression.\n </p>\n }\n\n @for (cond of group().conditions; track $index; let first = $first) {\n @if (!first) {\n <span class=\"lib-conditional-display-config__connector\" aria-hidden=\"true\">\n {{ group().connector === '&&' ? 'and' : 'or' }}\n </span>\n }\n <div class=\"lib-conditional-display-config__cond\">\n <label class=\"lib-conditional-display-config__field\">\n <span class=\"lib-conditional-display-config__f-label\">Field</span>\n <select\n class=\"lib-conditional-display-config__control\"\n [class.lib-conditional-display-config__control--invalid]=\"!cond.field\"\n [disabled]=\"disabled\"\n (change)=\"updateCondition($index, { field: inputValue($event) })\"\n >\n <option value=\"\" disabled [selected]=\"!cond.field\">Choose…</option>\n @if (directFields().length) {\n <optgroup label=\"Fields\">\n @for (f of directFields(); track f.variable) {\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.field\">{{ f.label }}</option>\n }\n </optgroup>\n }\n @if (listFields().length) {\n <optgroup label=\"List fields\">\n @for (f of listFields(); track f.variable) {\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.field\">{{ f.label }}</option>\n }\n </optgroup>\n }\n </select>\n </label>\n\n <label class=\"lib-conditional-display-config__field\">\n <span class=\"lib-conditional-display-config__f-label\">Condition</span>\n <select\n class=\"lib-conditional-display-config__control\"\n [disabled]=\"disabled\"\n (change)=\"updateCondition($index, { operator: inputValue($event) })\"\n >\n @for (op of operators; track op.value) {\n <option [value]=\"op.value\" [selected]=\"op.value === cond.operator\">{{ op.label }}</option>\n }\n </select>\n </label>\n\n <div class=\"lib-conditional-display-config__field lib-conditional-display-config__field--value\">\n <span class=\"lib-conditional-display-config__f-label\">\n {{ cond.compareTo === 'field' ? 'Other field' : 'Value' }}\n </span>\n <div class=\"lib-conditional-display-config__value\">\n @if (cond.compareTo === 'field') {\n <select\n class=\"lib-conditional-display-config__control\"\n [class.lib-conditional-display-config__control--invalid]=\"!cond.value\"\n [disabled]=\"disabled\"\n (change)=\"updateCondition($index, { value: inputValue($event) })\"\n >\n <option value=\"\" disabled [selected]=\"!cond.value\">Choose…</option>\n @if (directFields().length) {\n <optgroup label=\"Fields\">\n @for (f of directFields(); track f.variable) {\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.value\">{{ f.label }}</option>\n }\n </optgroup>\n }\n @if (listFields().length) {\n <optgroup label=\"List fields\">\n @for (f of listFields(); track f.variable) {\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.value\">{{ f.label }}</option>\n }\n </optgroup>\n }\n </select>\n } @else {\n <input\n class=\"lib-conditional-display-config__control\"\n [value]=\"cond.value\"\n [disabled]=\"disabled\"\n (input)=\"updateCondition($index, { value: inputValue($event) })\"\n placeholder=\"leave empty for “is empty”\"\n />\n }\n <button\n type=\"button\"\n class=\"lib-conditional-display-config__icon-btn\"\n [disabled]=\"disabled\"\n (click)=\"toggleCompareTo($index)\"\n [attr.aria-label]=\"\n cond.compareTo === 'field' ? 'Compare to a typed value' : 'Compare to another field'\n \"\n [matTooltip]=\"\n cond.compareTo === 'field' ? 'Compare to a typed value' : 'Compare to another field'\n \"\n >\n <mat-icon>{{ cond.compareTo === 'field' ? 'edit' : 'link' }}</mat-icon>\n </button>\n <button\n type=\"button\"\n class=\"lib-conditional-display-config__icon-btn\"\n [disabled]=\"disabled\"\n (click)=\"removeCondition($index)\"\n matTooltip=\"Remove condition\"\n aria-label=\"Remove condition\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </div>\n </div>\n </div>\n }\n\n <button\n type=\"button\"\n class=\"lib-conditional-display-config__link\"\n [disabled]=\"disabled\"\n (click)=\"addCondition()\"\n >\n <mat-icon>add</mat-icon> Add condition\n </button>\n }\n\n @if (hasIncompleteCondition()) {\n <p class=\"lib-conditional-display-config__sub-hint lib-conditional-display-config__sub-hint--pending\">\n <mat-icon class=\"lib-conditional-display-config__pending-icon\">pending</mat-icon>\n <span>Unfinished conditions are ignored — pick a field to activate the rule.</span>\n </p>\n }\n\n @if (referencedListFields().length) {\n <div class=\"lib-conditional-display-config__lists\">\n <span class=\"lib-conditional-display-config__f-label\">Combine each list</span>\n @for (f of referencedListFields(); track f.variable) {\n <div\n class=\"lib-conditional-display-config__list-row\"\n [class.lib-conditional-display-config__list-row--unset]=\"\n isAggregateRequired(f.variable) && !currentFunction(f.variable)\n \"\n >\n <span class=\"lib-conditional-display-config__list-name\">{{ f.label }}</span>\n <div class=\"lib-conditional-display-config__agg\" role=\"group\" [attr.aria-label]=\"'Combine ' + f.label\">\n @for (agg of aggregatesFor(f); track agg.value) {\n <button\n type=\"button\"\n class=\"lib-conditional-display-config__agg-chip\"\n [class.lib-conditional-display-config__agg-chip--on]=\"currentFunction(f.variable) === agg.value\"\n [disabled]=\"disabled\"\n (click)=\"setFunction(f.variable, agg.value)\"\n >\n {{ agg.label }}\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n\n @if (hasRule()) {\n <p class=\"lib-conditional-display-config__summary\">\n While hidden, this field is removed from the form — nothing is submitted and\n its validation cannot block.\n </p>\n\n @if (!raw()) {\n <details class=\"lib-conditional-display-config__preview\">\n <summary class=\"lib-conditional-display-config__preview-summary\">Expression</summary>\n <code>{{ expression() }}</code>\n </details>\n }\n }\n\n <div class=\"lib-conditional-display-config__foot\">\n @if (raw()) {\n <button\n type=\"button\"\n class=\"lib-conditional-display-config__link\"\n [disabled]=\"!canUseGuided()\"\n [matTooltip]=\"canUseGuided() ? '' : 'This expression is too advanced for the guided builder'\"\n (click)=\"useGuided()\"\n >\n <mat-icon>view_module</mat-icon> Guided\n </button>\n } @else {\n <button type=\"button\" class=\"lib-conditional-display-config__link\" (click)=\"useRaw()\">\n <mat-icon>code</mat-icon> Advanced\n </button>\n }\n\n @if (hasRule()) {\n <button\n type=\"button\"\n class=\"lib-conditional-display-config__link lib-conditional-display-config__link--danger\"\n [disabled]=\"disabled\"\n matTooltip=\"Remove the rule — the field becomes always visible\"\n (click)=\"clearRule()\"\n >\n <mat-icon>visibility</mat-icon> Always show\n </button>\n }\n </div>\n</section>\n"],"names":["uuidv4","i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;AAkEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CG;MAqBU,iCAAiC,CAAA;AApB9C,IAAA,WAAA,GAAA;;A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,OAAA,EAAA,CAAA,QAAA,CAAA,EAAA,QAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACrB,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACb,gBAAgB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,4BAAA,EAAA,oBAAA,EAAA,qBAAA,EAAA,qBAAA,EAAA,yBAAA,EAAA,YAAA,EAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAQP,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBApB7C,SAAS;+BACE,gCAAgC,EAAA,eAAA,EAGzB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,OAAA,EAChC;wBACP,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,qBAAqB;wBACrB,aAAa;wBACb,gBAAgB;qBACjB,EAAA,SAAA,EACU,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,iCAAmC,EAAE,CAAC,EAAA,IAAA,EACvF;AACJ,wBAAA,OAAO,EAAE,gCAAgC;AACzC,wBAAA,WAAW,EAAE,IAAI;AAClB,qBAAA,EAAA,QAAA,EAAA,44SAAA,EAAA,MAAA,EAAA,CAAA,igNAAA,CAAA,EAAA;;sBAqBA;;sBAEA;;sBAEA;;;;;"}
|
|
@@ -6,12 +6,12 @@ import * as i2 from '@angular/material/form-field';
|
|
|
6
6
|
import { MatFormFieldModule, MatFormFieldControl } from '@angular/material/form-field';
|
|
7
7
|
import * as i6 from '@angular/material/list';
|
|
8
8
|
import { MatListModule } from '@angular/material/list';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i5 from '@angular/material/select';
|
|
10
10
|
import { MatSelectModule } from '@angular/material/select';
|
|
11
11
|
import * as i8 from '@angular/material/toolbar';
|
|
12
12
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
13
13
|
import { Subject, take, tap, catchError, of } from 'rxjs';
|
|
14
|
-
import { E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-
|
|
14
|
+
import { E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-C1kZpYIM.mjs';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Internal editor that links each configured form input to an MSCOA
|
|
@@ -160,7 +160,7 @@ class ConfigMscoaAdditionalInputsComponent {
|
|
|
160
160
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ConfigMscoaAdditionalInputsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
161
161
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ConfigMscoaAdditionalInputsComponent, isStandalone: true, selector: "lib-config-mscoa-additional-inputs", inputs: { disabled: "disabled", required: "required", errors: "errors", mapToData: "mapToData", getMscoaTree: "getMscoaTree", value: "value" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "id", "attr.aria-describedby": "describedBy" }, classAttribute: "lib-config-mscoa-additional-inputs" }, providers: [
|
|
162
162
|
{ provide: MatFormFieldControl, useExisting: ConfigMscoaAdditionalInputsComponent },
|
|
163
|
-
], ngImport: i0, template: "@if (inputs().length > 0) {\r\n <mat-list class=\"lib-config-mscoa-additional-inputs__list\">\r\n <mat-toolbar class=\"lib-config-mscoa-additional-inputs__heading\">\r\n Additional inputs configuration\r\n </mat-toolbar>\r\n @for (input of inputs(); track input.id; let i = $index) {\r\n <mat-form-field\r\n class=\"lib-config-mscoa-additional-inputs__row\"\r\n appearance=\"outline\"\r\n subscriptSizing=\"dynamic\"\r\n (mouseover)=\"hovered.set(i)\"\r\n (mouseleave)=\"hovered.set(null)\">\r\n <mat-label>{{ input.label }}</mat-label>\r\n <mat-select\r\n matNativeControl\r\n [disabled]=\"disabled\"\r\n [value]=\"input.segment\"\r\n placeholder=\"select segment\"\r\n (selectionChange)=\"inputSegmentChanged($event, i)\">\r\n @for (segment of limitInputTo(); track segment.label) {\r\n <mat-option [value]=\"segment.value\">{{ segment.label }}</mat-option>\r\n }\r\n </mat-select>\r\n <mat-hint>Link formula to an input value</mat-hint>\r\n </mat-form-field>\r\n }\r\n </mat-list>\r\n} @else if (canAddInputs) {\r\n <lib-empty-state\r\n icon=\"info\"\r\n message=\"No input configuration available.\" />\r\n}\r\n", styles: [":host{display:block}.lib-config-mscoa-additional-inputs__list{display:flex;flex-direction:column;gap:.75rem;padding:0}.lib-config-mscoa-additional-inputs__row{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i6.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type:
|
|
163
|
+
], ngImport: i0, template: "@if (inputs().length > 0) {\r\n <mat-list class=\"lib-config-mscoa-additional-inputs__list\">\r\n <mat-toolbar class=\"lib-config-mscoa-additional-inputs__heading\">\r\n Additional inputs configuration\r\n </mat-toolbar>\r\n @for (input of inputs(); track input.id; let i = $index) {\r\n <mat-form-field\r\n class=\"lib-config-mscoa-additional-inputs__row\"\r\n appearance=\"outline\"\r\n subscriptSizing=\"dynamic\"\r\n (mouseover)=\"hovered.set(i)\"\r\n (mouseleave)=\"hovered.set(null)\">\r\n <mat-label>{{ input.label }}</mat-label>\r\n <mat-select\r\n matNativeControl\r\n [disabled]=\"disabled\"\r\n [value]=\"input.segment\"\r\n placeholder=\"select segment\"\r\n (selectionChange)=\"inputSegmentChanged($event, i)\">\r\n @for (segment of limitInputTo(); track segment.label) {\r\n <mat-option [value]=\"segment.value\">{{ segment.label }}</mat-option>\r\n }\r\n </mat-select>\r\n <mat-hint>Link formula to an input value</mat-hint>\r\n </mat-form-field>\r\n }\r\n </mat-list>\r\n} @else if (canAddInputs) {\r\n <lib-empty-state\r\n icon=\"info\"\r\n message=\"No input configuration available.\" />\r\n}\r\n", styles: [":host{display:block}.lib-config-mscoa-additional-inputs__list{display:flex;flex-direction:column;gap:.75rem;padding:0}.lib-config-mscoa-additional-inputs__row{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i6.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: EmptyStateComponent, selector: "lib-empty-state", inputs: ["icon", "message"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
164
164
|
}
|
|
165
165
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ConfigMscoaAdditionalInputsComponent, decorators: [{
|
|
166
166
|
type: Component,
|
|
@@ -192,4 +192,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
192
192
|
}] } });
|
|
193
193
|
|
|
194
194
|
export { ConfigMscoaAdditionalInputsComponent };
|
|
195
|
-
//# sourceMappingURL=ngx-t-forms-config-mscoa-additional-inputs.component-
|
|
195
|
+
//# sourceMappingURL=ngx-t-forms-config-mscoa-additional-inputs.component-DKb3E9gA.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-config-mscoa-additional-inputs.component-CXMmDwKS.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 {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n Input,\r\n ViewEncapsulation,\r\n computed,\r\n inject,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { Subject, catchError, of, take, tap, type Observable } from 'rxjs';\r\n\r\nimport type { FormColumnInputs, IGetTreeResponse } from 'ngx-t-forms-types';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\n/**\r\n * A configured form input paired with the MSCOA account-segment it links to.\r\n *\r\n * `segment` is `undefined` when the user selects \"None\" (i.e. the input is not\r\n * bound to any account segment).\r\n */\r\nexport interface ConfiguredMscoaInput extends FormColumnInputs {\r\n /** Selected account-segment key. `undefined` when the user picks \"None\". */\r\n segment: string | undefined;\r\n}\r\n\r\n/** A selectable account-segment option (plus the synthetic \"None\" entry). */\r\ninterface SegmentOption {\r\n readonly value: string | undefined;\r\n readonly label: string;\r\n}\r\n\r\n/**\r\n * Internal editor that links each configured form input to an MSCOA\r\n * account-segment, implementing `MatFormFieldControl<ConfiguredMscoaInput[]>`\r\n * for the dynamic-data-edit configuration surface.\r\n *\r\n * Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,\r\n * hint, and validation errors — so this component owns only the per-input\r\n * segment selectors and the empty-state hint.\r\n *\r\n * NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /\r\n * `required` / `placeholder` / `id` members, `@Input()` decorators, the\r\n * `focused` / `touched` / `stateChanges` members, and the `useExisting`\r\n * provider. These are framework wiring, not defects — the CLAUDE.md bans on\r\n * `@Input()` / `useExisting` do not apply to MatFormFieldControl integration.\r\n */\r\n@Component({\r\n selector: 'lib-config-mscoa-additional-inputs',\r\n imports: [\r\n MatListModule,\r\n MatToolbarModule,\r\n MatFormFieldModule,\r\n MatSelectModule,\r\n EmptyStateComponent,\r\n ],\r\n templateUrl: './config-mscoa-additional-inputs.component.html',\r\n styleUrls: ['./config-mscoa-additional-inputs.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n providers: [\r\n { provide: MatFormFieldControl, useExisting: ConfigMscoaAdditionalInputsComponent },\r\n ],\r\n host: {\r\n 'class': 'lib-config-mscoa-additional-inputs',\r\n '[id]': 'id',\r\n '[attr.aria-describedby]': 'describedBy',\r\n },\r\n})\r\nexport class ConfigMscoaAdditionalInputsComponent\r\n implements MatFormFieldControl<ConfiguredMscoaInput[]>\r\n{\r\n static nextId = 0;\r\n\r\n // ---- MatFormFieldControl wiring (framework-mandated plain members) -------\r\n\r\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\r\n readonly stateChanges = new Subject<void>();\r\n readonly controlType = 'lib-config-mscoa-additional-inputs';\r\n\r\n id = `app-config-mscoa-additional-inputs-${ConfigMscoaAdditionalInputsComponent.nextId++}`;\r\n placeholder = '';\r\n focused = false;\r\n touched = false;\r\n describedBy = '';\r\n autofilled: boolean | undefined = undefined;\r\n userAriaDescribedBy: string | undefined = undefined;\r\n disableAutomaticLabeling: boolean | undefined = undefined;\r\n\r\n readonly ngControl = inject(NgControl, { self: true, optional: true });\r\n\r\n readonly #destroyRef = inject(DestroyRef);\r\n\r\n // ---- Public input/output contract ---------------------------------------\r\n\r\n /** Whether all segment selectors are inert. */\r\n @Input() disabled = false;\r\n\r\n /** Whether a value is required (drives the MFC error state). */\r\n @Input() required = false;\r\n\r\n /** Validation errors surfaced by the parent for error-state derivation. */\r\n @Input() errors: IConfigElementError[] | undefined = [];\r\n\r\n /** Data context; the add-input affordance is gated on `mapToData?.id`. */\r\n @Input() mapToData: FormColumnInputs | undefined = undefined;\r\n\r\n /**\r\n * One-shot stream of the MSCOA tree. The first emitted response's\r\n * `accountTreeKeys` populate the per-input segment options; later\r\n * assignments are ignored (the stream is consumed once).\r\n */\r\n @Input() set getMscoaTree(options$: Observable<IGetTreeResponse | undefined>) {\r\n if (!options$ || this.#mscoaInitiated) {\r\n return;\r\n }\r\n this.#mscoaInitiated = true;\r\n options$\r\n .pipe(\r\n take(1),\r\n tap((options) => this.#accountTreeKeys.set(options?.accountTreeKeys ?? [])),\r\n catchError(() => of(undefined)),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe();\r\n }\r\n\r\n /** Emits the full configured-input list whenever a segment changes. */\r\n readonly valueChanged = output<ConfiguredMscoaInput[]>();\r\n\r\n #mscoaInitiated = false;\r\n readonly #accountTreeKeys = signal<string[]>([]);\r\n readonly #value = signal<ConfiguredMscoaInput[]>([]);\r\n\r\n /** Currently hovered list row index, for hover affordances. */\r\n protected readonly hovered = signal<number | null>(null);\r\n\r\n /**\r\n * Segment options offered per input: every account-tree key plus a trailing\r\n * synthetic \"None\" entry that clears the binding.\r\n */\r\n protected readonly limitInputTo = computed<SegmentOption[]>(() => [\r\n ...this.#accountTreeKeys().map((key) => ({ value: key as string | undefined, label: key })),\r\n { value: undefined, label: 'None' },\r\n ]);\r\n\r\n /**\r\n * Whether the empty-state hint may render.\r\n *\r\n * A plain getter (not a `computed()`) because `mapToData` is a framework-style\r\n * mutable `@Input` rather than a signal — OnPush re-evaluates this binding\r\n * each change-detection pass.\r\n */\r\n protected get canAddInputs(): boolean {\r\n return !!this.mapToData?.id;\r\n }\r\n\r\n /** Configured inputs to render. */\r\n protected readonly inputs = this.#value.asReadonly();\r\n\r\n /** Current MatFormFieldControl value (the configured-input list). */\r\n @Input()\r\n get value(): ConfiguredMscoaInput[] {\r\n return this.#value();\r\n }\r\n set value(val: ConfiguredMscoaInput[]) {\r\n this.#value.set(val ?? []);\r\n this.stateChanges.next();\r\n }\r\n\r\n // ---- MatFormFieldControl framework getters ------------------------------\r\n\r\n get empty(): boolean {\r\n return this.#value().length === 0;\r\n }\r\n\r\n get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n get errorState(): boolean {\r\n const requiredUnset = this.empty && this.required;\r\n const ngControlError = this.ngControl?.errors != null;\r\n const externalError = (this.errors?.length ?? 0) > 0 && this.touched;\r\n return requiredUnset || ngControlError || externalError;\r\n }\r\n\r\n setDescribedByIds(ids: string[]): void {\r\n this.describedBy = ids.join(' ');\r\n this.stateChanges.next();\r\n }\r\n\r\n onContainerClick(): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n onTouched: () => void = () => {};\r\n\r\n markAsTouched(): void {\r\n if (!this.touched) {\r\n this.touched = true;\r\n this.onTouched();\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n // ---- Behaviour ----------------------------------------------------------\r\n\r\n /**\r\n * Assigns the chosen account-segment to the input at `index` and emits the\r\n * updated list immediately. Selecting \"None\" (`undefined`) clears the binding.\r\n */\r\n inputSegmentChanged(\r\n event: { detail?: { value: string }; value?: string },\r\n index: number,\r\n ): void {\r\n const detailValue = event.detail?.value ?? event.value;\r\n const current = this.#value();\r\n const item = current[index];\r\n if (!item) {\r\n return;\r\n }\r\n const next = current.map((input, i) =>\r\n i === index\r\n ? { ...input, segment: detailValue === 'None' ? undefined : detailValue }\r\n : input,\r\n );\r\n this.#value.set(next);\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n this.valueChanged.emit(next);\r\n }\r\n}\r\n","@if (inputs().length > 0) {\r\n <mat-list class=\"lib-config-mscoa-additional-inputs__list\">\r\n <mat-toolbar class=\"lib-config-mscoa-additional-inputs__heading\">\r\n Additional inputs configuration\r\n </mat-toolbar>\r\n @for (input of inputs(); track input.id; let i = $index) {\r\n <mat-form-field\r\n class=\"lib-config-mscoa-additional-inputs__row\"\r\n appearance=\"outline\"\r\n subscriptSizing=\"dynamic\"\r\n (mouseover)=\"hovered.set(i)\"\r\n (mouseleave)=\"hovered.set(null)\">\r\n <mat-label>{{ input.label }}</mat-label>\r\n <mat-select\r\n matNativeControl\r\n [disabled]=\"disabled\"\r\n [value]=\"input.segment\"\r\n placeholder=\"select segment\"\r\n (selectionChange)=\"inputSegmentChanged($event, i)\">\r\n @for (segment of limitInputTo(); track segment.label) {\r\n <mat-option [value]=\"segment.value\">{{ segment.label }}</mat-option>\r\n }\r\n </mat-select>\r\n <mat-hint>Link formula to an input value</mat-hint>\r\n </mat-form-field>\r\n }\r\n </mat-list>\r\n} @else if (canAddInputs) {\r\n <lib-empty-state\r\n icon=\"info\"\r\n message=\"No input configuration available.\" />\r\n}\r\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,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;;;QAKhC,IAAA,CAAA,QAAQ,GAAG,KAAK;;QAGhB,IAAA,CAAA,QAAQ,GAAG,KAAK;;QAGhB,IAAA,CAAA,MAAM,GAAsC,EAAE;;QAG9C,IAAA,CAAA,SAAS,GAAiC,SAAS;;QAuBnD,IAAA,CAAA,YAAY,GAAG,MAAM,EAA0B;QAExD,IAAA,CAAA,eAAe,GAAG,KAAK;AACd,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAW,EAAE,uFAAC;AACvC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAyB,EAA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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,0wCAAA,EAAA,MAAA,EAAA,CAAA,8KAAA,CAAA,EAAA;;sBA6BA;;sBAGA;;sBAGA;;sBAGA;;sBAOA;;sBAiDA;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-config-mscoa-additional-inputs.component-DKb3E9gA.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 {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n Input,\r\n ViewEncapsulation,\r\n computed,\r\n inject,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { Subject, catchError, of, take, tap, type Observable } from 'rxjs';\r\n\r\nimport type { FormColumnInputs, IGetTreeResponse } from 'ngx-t-forms-types';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\n/**\r\n * A configured form input paired with the MSCOA account-segment it links to.\r\n *\r\n * `segment` is `undefined` when the user selects \"None\" (i.e. the input is not\r\n * bound to any account segment).\r\n */\r\nexport interface ConfiguredMscoaInput extends FormColumnInputs {\r\n /** Selected account-segment key. `undefined` when the user picks \"None\". */\r\n segment: string | undefined;\r\n}\r\n\r\n/** A selectable account-segment option (plus the synthetic \"None\" entry). */\r\ninterface SegmentOption {\r\n readonly value: string | undefined;\r\n readonly label: string;\r\n}\r\n\r\n/**\r\n * Internal editor that links each configured form input to an MSCOA\r\n * account-segment, implementing `MatFormFieldControl<ConfiguredMscoaInput[]>`\r\n * for the dynamic-data-edit configuration surface.\r\n *\r\n * Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,\r\n * hint, and validation errors — so this component owns only the per-input\r\n * segment selectors and the empty-state hint.\r\n *\r\n * NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /\r\n * `required` / `placeholder` / `id` members, `@Input()` decorators, the\r\n * `focused` / `touched` / `stateChanges` members, and the `useExisting`\r\n * provider. These are framework wiring, not defects — the CLAUDE.md bans on\r\n * `@Input()` / `useExisting` do not apply to MatFormFieldControl integration.\r\n */\r\n@Component({\r\n selector: 'lib-config-mscoa-additional-inputs',\r\n imports: [\r\n MatListModule,\r\n MatToolbarModule,\r\n MatFormFieldModule,\r\n MatSelectModule,\r\n EmptyStateComponent,\r\n ],\r\n templateUrl: './config-mscoa-additional-inputs.component.html',\r\n styleUrls: ['./config-mscoa-additional-inputs.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n providers: [\r\n { provide: MatFormFieldControl, useExisting: ConfigMscoaAdditionalInputsComponent },\r\n ],\r\n host: {\r\n 'class': 'lib-config-mscoa-additional-inputs',\r\n '[id]': 'id',\r\n '[attr.aria-describedby]': 'describedBy',\r\n },\r\n})\r\nexport class ConfigMscoaAdditionalInputsComponent\r\n implements MatFormFieldControl<ConfiguredMscoaInput[]>\r\n{\r\n static nextId = 0;\r\n\r\n // ---- MatFormFieldControl wiring (framework-mandated plain members) -------\r\n\r\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\r\n readonly stateChanges = new Subject<void>();\r\n readonly controlType = 'lib-config-mscoa-additional-inputs';\r\n\r\n id = `app-config-mscoa-additional-inputs-${ConfigMscoaAdditionalInputsComponent.nextId++}`;\r\n placeholder = '';\r\n focused = false;\r\n touched = false;\r\n describedBy = '';\r\n autofilled: boolean | undefined = undefined;\r\n userAriaDescribedBy: string | undefined = undefined;\r\n disableAutomaticLabeling: boolean | undefined = undefined;\r\n\r\n readonly ngControl = inject(NgControl, { self: true, optional: true });\r\n\r\n readonly #destroyRef = inject(DestroyRef);\r\n\r\n // ---- Public input/output contract ---------------------------------------\r\n\r\n /** Whether all segment selectors are inert. */\r\n @Input() disabled = false;\r\n\r\n /** Whether a value is required (drives the MFC error state). */\r\n @Input() required = false;\r\n\r\n /** Validation errors surfaced by the parent for error-state derivation. */\r\n @Input() errors: IConfigElementError[] | undefined = [];\r\n\r\n /** Data context; the add-input affordance is gated on `mapToData?.id`. */\r\n @Input() mapToData: FormColumnInputs | undefined = undefined;\r\n\r\n /**\r\n * One-shot stream of the MSCOA tree. The first emitted response's\r\n * `accountTreeKeys` populate the per-input segment options; later\r\n * assignments are ignored (the stream is consumed once).\r\n */\r\n @Input() set getMscoaTree(options$: Observable<IGetTreeResponse | undefined>) {\r\n if (!options$ || this.#mscoaInitiated) {\r\n return;\r\n }\r\n this.#mscoaInitiated = true;\r\n options$\r\n .pipe(\r\n take(1),\r\n tap((options) => this.#accountTreeKeys.set(options?.accountTreeKeys ?? [])),\r\n catchError(() => of(undefined)),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe();\r\n }\r\n\r\n /** Emits the full configured-input list whenever a segment changes. */\r\n readonly valueChanged = output<ConfiguredMscoaInput[]>();\r\n\r\n #mscoaInitiated = false;\r\n readonly #accountTreeKeys = signal<string[]>([]);\r\n readonly #value = signal<ConfiguredMscoaInput[]>([]);\r\n\r\n /** Currently hovered list row index, for hover affordances. */\r\n protected readonly hovered = signal<number | null>(null);\r\n\r\n /**\r\n * Segment options offered per input: every account-tree key plus a trailing\r\n * synthetic \"None\" entry that clears the binding.\r\n */\r\n protected readonly limitInputTo = computed<SegmentOption[]>(() => [\r\n ...this.#accountTreeKeys().map((key) => ({ value: key as string | undefined, label: key })),\r\n { value: undefined, label: 'None' },\r\n ]);\r\n\r\n /**\r\n * Whether the empty-state hint may render.\r\n *\r\n * A plain getter (not a `computed()`) because `mapToData` is a framework-style\r\n * mutable `@Input` rather than a signal — OnPush re-evaluates this binding\r\n * each change-detection pass.\r\n */\r\n protected get canAddInputs(): boolean {\r\n return !!this.mapToData?.id;\r\n }\r\n\r\n /** Configured inputs to render. */\r\n protected readonly inputs = this.#value.asReadonly();\r\n\r\n /** Current MatFormFieldControl value (the configured-input list). */\r\n @Input()\r\n get value(): ConfiguredMscoaInput[] {\r\n return this.#value();\r\n }\r\n set value(val: ConfiguredMscoaInput[]) {\r\n this.#value.set(val ?? []);\r\n this.stateChanges.next();\r\n }\r\n\r\n // ---- MatFormFieldControl framework getters ------------------------------\r\n\r\n get empty(): boolean {\r\n return this.#value().length === 0;\r\n }\r\n\r\n get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n get errorState(): boolean {\r\n const requiredUnset = this.empty && this.required;\r\n const ngControlError = this.ngControl?.errors != null;\r\n const externalError = (this.errors?.length ?? 0) > 0 && this.touched;\r\n return requiredUnset || ngControlError || externalError;\r\n }\r\n\r\n setDescribedByIds(ids: string[]): void {\r\n this.describedBy = ids.join(' ');\r\n this.stateChanges.next();\r\n }\r\n\r\n onContainerClick(): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n onTouched: () => void = () => {};\r\n\r\n markAsTouched(): void {\r\n if (!this.touched) {\r\n this.touched = true;\r\n this.onTouched();\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n // ---- Behaviour ----------------------------------------------------------\r\n\r\n /**\r\n * Assigns the chosen account-segment to the input at `index` and emits the\r\n * updated list immediately. Selecting \"None\" (`undefined`) clears the binding.\r\n */\r\n inputSegmentChanged(\r\n event: { detail?: { value: string }; value?: string },\r\n index: number,\r\n ): void {\r\n const detailValue = event.detail?.value ?? event.value;\r\n const current = this.#value();\r\n const item = current[index];\r\n if (!item) {\r\n return;\r\n }\r\n const next = current.map((input, i) =>\r\n i === index\r\n ? { ...input, segment: detailValue === 'None' ? undefined : detailValue }\r\n : input,\r\n );\r\n this.#value.set(next);\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n this.valueChanged.emit(next);\r\n }\r\n}\r\n","@if (inputs().length > 0) {\r\n <mat-list class=\"lib-config-mscoa-additional-inputs__list\">\r\n <mat-toolbar class=\"lib-config-mscoa-additional-inputs__heading\">\r\n Additional inputs configuration\r\n </mat-toolbar>\r\n @for (input of inputs(); track input.id; let i = $index) {\r\n <mat-form-field\r\n class=\"lib-config-mscoa-additional-inputs__row\"\r\n appearance=\"outline\"\r\n subscriptSizing=\"dynamic\"\r\n (mouseover)=\"hovered.set(i)\"\r\n (mouseleave)=\"hovered.set(null)\">\r\n <mat-label>{{ input.label }}</mat-label>\r\n <mat-select\r\n matNativeControl\r\n [disabled]=\"disabled\"\r\n [value]=\"input.segment\"\r\n placeholder=\"select segment\"\r\n (selectionChange)=\"inputSegmentChanged($event, i)\">\r\n @for (segment of limitInputTo(); track segment.label) {\r\n <mat-option [value]=\"segment.value\">{{ segment.label }}</mat-option>\r\n }\r\n </mat-select>\r\n <mat-hint>Link formula to an input value</mat-hint>\r\n </mat-form-field>\r\n }\r\n </mat-list>\r\n} @else if (canAddInputs) {\r\n <lib-empty-state\r\n icon=\"info\"\r\n message=\"No input configuration available.\" />\r\n}\r\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,oCA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