ngx-t-forms 3.1.7 → 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-CCwUtGOH.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-BUCFidjW.mjs → ngx-t-forms-auto-complete-input-element.component-B8eluIrh.mjs} +9 -9
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-BUCFidjW.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-C92Y7CW_.mjs → ngx-t-forms-basic-input-input-element.component-SSLXyCz9.mjs} +16 -8
- package/fesm2022/ngx-t-forms-basic-input-input-element.component-SSLXyCz9.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-Cn_rxXMX.mjs +603 -0
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-Cn_rxXMX.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-CWJMjBoK.mjs → ngx-t-forms-chip-options-creator-editor.component-CGm5tgsp.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-CWJMjBoK.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-zauBVptA.mjs → ngx-t-forms-conditional-display-config.component-DIMIWTKj.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-conditional-display-config.component-zauBVptA.mjs.map → ngx-t-forms-conditional-display-config.component-DIMIWTKj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-C096Ib2V.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-DKb3E9gA.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-C096Ib2V.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-DKb3E9gA.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-data-source-picker.component-WkSQqjd-.mjs → ngx-t-forms-data-source-picker.component-BG_sr5VH.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-data-source-picker.component-WkSQqjd-.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-Dtzq25sw.mjs → ngx-t-forms-date-picker-input-element.component-vUlUuzJ0.mjs} +10 -10
- package/fesm2022/ngx-t-forms-date-picker-input-element.component-vUlUuzJ0.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-W8KV-zoC.mjs → ngx-t-forms-date-range-picker-input-element.component-YVE_s-7Y.mjs} +7 -7
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-YVE_s-7Y.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-date-time-picker-input-element.component-CQXZDwAo.mjs → ngx-t-forms-date-time-picker-input-element.component-BlOS8NdF.mjs} +11 -10
- package/fesm2022/ngx-t-forms-date-time-picker-input-element.component-BlOS8NdF.mjs.map +1 -0
- 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-CvATcveO.mjs → ngx-t-forms-document-picker.component-DOYyRgh4.mjs} +44 -262
- package/fesm2022/ngx-t-forms-document-picker.component-DOYyRgh4.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-editor-input-element.component-BqofP5-4.mjs → ngx-t-forms-editor-input-element.component-BvZPNjQX.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-editor-input-element.component-BqofP5-4.mjs.map → ngx-t-forms-editor-input-element.component-BvZPNjQX.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-BAQx2BLX.mjs → ngx-t-forms-file-upload-input-element.component-CONELqoi.mjs} +10 -10
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-BAQx2BLX.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-M6O7-j2Q.mjs → ngx-t-forms-form-input-selector.component-Bdkuzw0R.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-input-selector.component-M6O7-j2Q.mjs.map → ngx-t-forms-form-input-selector.component-Bdkuzw0R.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-Dd-EMosV.mjs → ngx-t-forms-form-json-view.component-CDcbgWgN.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-Dd-EMosV.mjs.map → ngx-t-forms-form-json-view.component-CDcbgWgN.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-B1dYMlCC.mjs → ngx-t-forms-form-section-stepper.component-CqLSI8zP.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-B1dYMlCC.mjs.map → ngx-t-forms-form-section-stepper.component-CqLSI8zP.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-S2qfSAT-.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-h6fClNMS.mjs +187 -0
- package/fesm2022/ngx-t-forms-forms-native-date-adapter-h6fClNMS.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-geo-location.component-whY7YIMk.mjs → ngx-t-forms-geo-location.component-DA3ATrvw.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-geo-location.component-whY7YIMk.mjs.map → ngx-t-forms-geo-location.component-DA3ATrvw.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-header-template-editor.component-BLn_-jPM.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-D05NKiWm.mjs → ngx-t-forms-image-capture-input-element.component-C9oz_ZjA.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-D05NKiWm.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-CGz6j56m.mjs → ngx-t-forms-input-custom.component-CqIr5wpy.mjs} +148 -27
- package/fesm2022/ngx-t-forms-input-custom.component-CqIr5wpy.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-editor.component-DxrkUbed.mjs → ngx-t-forms-input-editor.component-DU2sgo4i.mjs} +9 -9
- package/fesm2022/{ngx-t-forms-input-editor.component-DxrkUbed.mjs.map → ngx-t-forms-input-editor.component-DU2sgo4i.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-Cu_L5CRA.mjs → ngx-t-forms-map-mat-options-keys-WfFq_0tS.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-Cu_L5CRA.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-B98Hv4M1.mjs → ngx-t-forms-mat-chip-list-editor.component-CKnvqeix.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-B98Hv4M1.mjs.map → ngx-t-forms-mat-chip-list-editor.component-CKnvqeix.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-CSnHK6ZR.mjs → ngx-t-forms-missing-form-configs.component-B5dDbmpj.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-CSnHK6ZR.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-CBqzX9H7.mjs → ngx-t-forms-mscoa-config.component-BtLd7F2n.mjs} +10 -10
- package/fesm2022/{ngx-t-forms-mscoa-config.component-CBqzX9H7.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-Cr1HXTjG.mjs → ngx-t-forms-mscoa-segment-config.component-DrzpixbK.mjs} +9 -9
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-Cr1HXTjG.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-Dt4iPwb-.mjs → ngx-t-forms-ngx-t-forms-C1kZpYIM.mjs} +17432 -6875
- 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-Dx0pI0A1.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-VySkMHQI.mjs → ngx-t-forms-pipeline-generator.component-DpqipW6G.mjs} +15 -15
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-VySkMHQI.mjs.map → ngx-t-forms-pipeline-generator.component-DpqipW6G.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-quill-input.component-BLaPFcJE.mjs → ngx-t-forms-quill-input.component-x9CHGOJy.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-quill-input.component-BLaPFcJE.mjs.map → ngx-t-forms-quill-input.component-x9CHGOJy.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-record-list-manager.component-qlizX9F4.mjs → ngx-t-forms-record-list-manager.component-BGg86NER.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-record-list-manager.component-qlizX9F4.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-CLYe2Lf_.mjs → ngx-t-forms-rest-api-call-setup.component-B4LzPwxg.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-CLYe2Lf_.mjs.map → ngx-t-forms-rest-api-call-setup.component-B4LzPwxg.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-section-report.component-foLHlD-I.mjs → ngx-t-forms-section-report.component-BS2CV_xl.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-section-report.component-foLHlD-I.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-D4luMX5c.mjs → ngx-t-forms-selection-options-editor.component-B6sYvtcj.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-D4luMX5c.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-ri0r0ujE.mjs +161 -0
- 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-BAjGepTM.mjs → ngx-t-forms-token-text-input.component-BWmoGQfi.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-token-text-input.component-BAjGepTM.mjs.map → ngx-t-forms-token-text-input.component-BWmoGQfi.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-DVB88bgW.mjs → ngx-t-forms-validators-config.component-DEm9M5s9.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-validators-config.component-DVB88bgW.mjs.map → ngx-t-forms-validators-config.component-DEm9M5s9.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-LoF_fpHu.mjs → ngx-t-forms-workflow-adjudication.component-BOC9Z40E.mjs} +96 -35
- 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 +2864 -168
- package/fesm2022/ngx-t-forms-api-endpoint-config.component-CCwUtGOH.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-basic-input-input-element.component-C92Y7CW_.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-33ZARq4R.mjs +0 -603
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-33ZARq4R.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-date-picker-input-element.component-Dtzq25sw.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-W8KV-zoC.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-date-time-picker-input-element.component-CQXZDwAo.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-3LcpNBQI.mjs +0 -373
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-3LcpNBQI.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-picker.component-CvATcveO.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-S2qfSAT-.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-header-template-editor.component-BLn_-jPM.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-index-BnK4nGDh.mjs +0 -2
- package/fesm2022/ngx-t-forms-index-BnK4nGDh.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-custom.component-CGz6j56m.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-BUj7wGyx.mjs +0 -38
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-BUj7wGyx.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CfZLcuuu.mjs +0 -2336
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CfZLcuuu.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-Dt4iPwb-.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-paginated-selection-table-lMTD1N6B.mjs +0 -555
- package/fesm2022/ngx-t-forms-paginated-selection-table-lMTD1N6B.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-payload-template-editor.component-Dx0pI0A1.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-DY37Qrnj.mjs +0 -271
- package/fesm2022/ngx-t-forms-required-inputs.component-DY37Qrnj.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-select-input-element.component-CvrNfvXa.mjs +0 -160
- package/fesm2022/ngx-t-forms-select-input-element.component-CvrNfvXa.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-textarea-input-element.component-BWyxWDvp.mjs +0 -95
- package/fesm2022/ngx-t-forms-textarea-input-element.component-BWyxWDvp.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-toggle-input-element.component-CpYC2ivQ.mjs +0 -93
- package/fesm2022/ngx-t-forms-toggle-input-element.component-CpYC2ivQ.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-LoF_fpHu.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-document-picker.component-DOYyRgh4.mjs","sources":["../../../projects/ngx-t-forms/src/lib/services/document-picker/document-query.store.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/document-picker/core/document-browser-dialog/document-browser-dialog.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/document-picker/core/document-browser-dialog/document-browser-dialog.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/document-picker/core/document-picker-reactive-input/document-picker-reactive-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/document-picker/core/document-picker-reactive-input/document-picker-reactive-input.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/document-picker/document-picker.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/document-picker/document-picker.component.html"],"sourcesContent":["import { DestroyRef, Injectable, computed, inject, signal } from '@angular/core';\r\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\r\nimport { catchError, distinctUntilChanged, forkJoin, map, of, switchMap, tap } from 'rxjs';\r\nimport type {\r\n IDocumentPage,\r\n IDocumentQueryRequest,\r\n IWorkflowStepOption,\r\n} from 'ngx-t-forms-types';\r\nimport { DOCUMENT_REPOSITORY } from '../../tokens/document-repository.token';\r\nimport {\r\n DEFAULT_DOCUMENT_PAGE_SIZE,\r\n DEFAULT_DOCUMENT_SORT,\r\n DocumentPickerConfigurationError,\r\n type DocumentColumn,\r\n type DocumentSort,\r\n} from '../../domain/document-picker/document-picker.model';\r\nimport { buildDocumentSearchSchema, resolveDocumentColumns } from './document-columns';\r\n\r\n/** Why the picker currently has nothing to show. */\r\nexport interface DocumentQueryError {\r\n /**\r\n * `configuration` means the picker can never work as set up — a missing host\r\n * function or an unusable workflow — and retrying will not help. `query` means this\r\n * particular request failed and retrying is worth offering.\r\n */\r\n readonly kind: 'configuration' | 'query';\r\n readonly message: string;\r\n}\r\n\r\n/** Everything the picker needs to start querying a workflow. */\r\nexport interface DocumentQuerySetup {\r\n readonly workflowId: string;\r\n /** Step, preset and archive clauses, already resolved by the caller. */\r\n readonly filter: Record<string, unknown>;\r\n readonly pageSize?: number;\r\n}\r\n\r\n/** Snapshot compared to decide whether a new request is actually a new request. */\r\ninterface RequestKey {\r\n readonly request: IDocumentQueryRequest | null;\r\n readonly tick: number;\r\n}\r\n\r\n/**\r\n * Owns one document picker's query: which page, in what order, filtered how, matching\r\n * what search term.\r\n *\r\n * Every user action funnels into a single request, and that request is the only thing\r\n * that triggers a fetch — the picker never loads because a control gained focus or a\r\n * validator changed. Requests are switched, so a slow page can no longer overwrite the\r\n * page the user is actually looking at.\r\n *\r\n * Paging is keyset-based, so the cursor for page N is only known once page N-1 has been\r\n * read. The store keeps the cursors it has seen and moves one page at a time; anything\r\n * that invalidates them — a new sort, filter, search term or page size — resets paging\r\n * to the first page rather than sending a cursor the server would reject.\r\n *\r\n * @internal Provided per picker instance; not exported via public-api.ts.\r\n */\r\n@Injectable()\r\nexport class DocumentQueryStore {\r\n readonly #repository = inject(DOCUMENT_REPOSITORY);\r\n readonly #destroyRef = inject(DestroyRef);\r\n\r\n readonly #workflowId = signal('');\r\n readonly #filter = signal<Record<string, unknown>>({});\r\n readonly #pageSize = signal(DEFAULT_DOCUMENT_PAGE_SIZE);\r\n readonly #sort = signal<DocumentSort>(DEFAULT_DOCUMENT_SORT);\r\n readonly #search = signal('');\r\n\r\n /** Cursor for each page reached so far; index 0 is always the first page. */\r\n readonly #cursors = signal<readonly (string | undefined)[]>([undefined]);\r\n readonly #pageIndex = signal(0);\r\n /** Bumped by {@link refresh} so an identical request is re-issued deliberately. */\r\n readonly #tick = signal(0);\r\n\r\n readonly #columns = signal<readonly DocumentColumn[]>([]);\r\n readonly #columnsReady = signal(false);\r\n readonly #steps = signal<readonly IWorkflowStepOption[]>([]);\r\n readonly #rows = signal<readonly Record<string, unknown>[]>([]);\r\n readonly #hasMore = signal(false);\r\n readonly #totalItems = signal<number | undefined>(undefined);\r\n readonly #totalPages = signal<number | undefined>(undefined);\r\n readonly #loading = signal(false);\r\n readonly #error = signal<DocumentQueryError | undefined>(undefined);\r\n\r\n /** Documents on the current page, in server order. */\r\n readonly rows = this.#rows.asReadonly();\r\n /** Columns to render, resolved from the workflow's list configuration. */\r\n readonly columns = this.#columns.asReadonly();\r\n /** Workflow steps available to filter by. */\r\n readonly steps = this.#steps.asReadonly();\r\n /** `true` while a page or the workflow metadata is in flight. */\r\n readonly loading = this.#loading.asReadonly();\r\n /** Why nothing is shown, or `undefined` when the last request succeeded. */\r\n readonly error = this.#error.asReadonly();\r\n /** Active sort. */\r\n readonly sort = this.#sort.asReadonly();\r\n /** Active search term. */\r\n readonly search = this.#search.asReadonly();\r\n /** Page size in force. */\r\n readonly pageSize = this.#pageSize.asReadonly();\r\n /** Zero-based index of the page being shown. */\r\n readonly pageIndex = this.#pageIndex.asReadonly();\r\n /** Total matching records — known from the first page only, then remembered. */\r\n readonly totalItems = this.#totalItems.asReadonly();\r\n /** Total pages for the current query, when the source reports it. */\r\n readonly totalPages = this.#totalPages.asReadonly();\r\n\r\n /** `true` when a further page exists after the current one. */\r\n readonly canGoNext = computed(() => this.#hasMore() && !this.#loading());\r\n /** `true` when the current page is not the first. */\r\n readonly canGoPrevious = computed(() => this.#pageIndex() > 0 && !this.#loading());\r\n /** `true` when the query succeeded and matched nothing. */\r\n readonly isEmpty = computed(\r\n () => !this.#loading() && !this.#error() && this.#rows().length === 0,\r\n );\r\n\r\n /** The request for the current state, or `null` while the store is not ready to query. */\r\n readonly #request = computed<IDocumentQueryRequest | null>(() => {\r\n const workflowId = this.#workflowId();\r\n if (!workflowId || !this.#columnsReady()) return null;\r\n\r\n const sort = this.#sort();\r\n const searchKey = this.#search().trim();\r\n const cursor = this.#cursors()[this.#pageIndex()];\r\n\r\n return {\r\n workflowId,\r\n itemsPerPage: this.#pageSize(),\r\n ...(cursor === undefined ? {} : { cursor }),\r\n sort: { [sort.path]: sort.direction },\r\n filter: this.#filter(),\r\n ...(searchKey === ''\r\n ? {}\r\n : { searchKey, schema: buildDocumentSearchSchema(this.#columns()) }),\r\n };\r\n });\r\n\r\n constructor() {\r\n this.#watchWorkflow();\r\n this.#watchRequest();\r\n }\r\n\r\n /**\r\n * Points the store at a workflow and its resolved filter. Safe to call on every\r\n * change-detection pass: identical setup is ignored, and a genuinely new filter\r\n * resets paging because outstanding cursors no longer describe the same result set.\r\n *\r\n * @param setup - Workflow, resolved filter clauses, and optional page size.\r\n */\r\n configure(setup: DocumentQuerySetup): void {\r\n if (setup.pageSize && setup.pageSize !== this.#pageSize()) {\r\n this.#pageSize.set(setup.pageSize);\r\n this.#resetPaging();\r\n }\r\n if (!sameFilter(this.#filter(), setup.filter)) {\r\n this.#filter.set({ ...setup.filter });\r\n this.#resetPaging();\r\n }\r\n if (setup.workflowId !== this.#workflowId()) {\r\n this.#workflowId.set(setup.workflowId);\r\n }\r\n }\r\n\r\n /**\r\n * Sorts by a document path. Re-selecting the active path flips its direction.\r\n *\r\n * @param path - Document path from a {@link DocumentColumn}, never a bare control name.\r\n */\r\n setSort(path: string): void {\r\n if (!path) return;\r\n const current = this.#sort();\r\n const direction: DocumentSort['direction'] =\r\n current.path === path && current.direction === -1 ? 1 : -1;\r\n this.#sort.set({ path, direction });\r\n this.#resetPaging();\r\n }\r\n\r\n /**\r\n * Applies a search term. Callers debounce their input; the store issues one request\r\n * per term it is given.\r\n *\r\n * @param term - Raw search text; blank clears the search.\r\n */\r\n setSearch(term: string): void {\r\n const next = term ?? '';\r\n if (next === this.#search()) return;\r\n this.#search.set(next);\r\n this.#resetPaging();\r\n }\r\n\r\n /** Changes the page size, returning to the first page. */\r\n setPageSize(size: number): void {\r\n if (size <= 0 || size === this.#pageSize()) return;\r\n this.#pageSize.set(size);\r\n this.#resetPaging();\r\n }\r\n\r\n /** Advances one page, if the last response reported another. */\r\n nextPage(): void {\r\n if (!this.canGoNext()) return;\r\n this.#pageIndex.update(index => index + 1);\r\n }\r\n\r\n /** Steps back one page. */\r\n previousPage(): void {\r\n if (!this.canGoPrevious()) return;\r\n this.#pageIndex.update(index => index - 1);\r\n }\r\n\r\n /** Returns to the first page without disturbing sort, filter or search. */\r\n firstPage(): void {\r\n if (this.#pageIndex() === 0) return;\r\n this.#resetPaging();\r\n }\r\n\r\n /** Re-issues the current request, discarding any page cursors beyond the first. */\r\n refresh(): void {\r\n this.#resetPaging();\r\n this.#tick.update(tick => tick + 1);\r\n }\r\n\r\n /** Drops every cursor and returns to the first page. */\r\n #resetPaging(): void {\r\n this.#cursors.set([undefined]);\r\n this.#pageIndex.set(0);\r\n this.#totalItems.set(undefined);\r\n this.#totalPages.set(undefined);\r\n }\r\n\r\n /** Loads the workflow's columns and steps whenever the workflow changes. */\r\n #watchWorkflow(): void {\r\n toObservable(this.#workflowId)\r\n .pipe(\r\n distinctUntilChanged(),\r\n tap(() => {\r\n this.#columnsReady.set(false);\r\n this.#columns.set([]);\r\n this.#steps.set([]);\r\n this.#rows.set([]);\r\n this.#error.set(undefined);\r\n this.#resetPaging();\r\n }),\r\n switchMap(workflowId => {\r\n if (!workflowId) return of(null);\r\n this.#loading.set(true);\r\n return forkJoin({\r\n columns: this.#repository.getColumns(workflowId),\r\n steps: this.#repository.getSteps(workflowId),\r\n }).pipe(\r\n map(result => ({\r\n columns: resolveDocumentColumns(result.columns),\r\n steps: result.steps,\r\n })),\r\n catchError(error => {\r\n this.#loading.set(false);\r\n this.#error.set(toQueryError(error));\r\n return of(null);\r\n }),\r\n );\r\n }),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe(result => {\r\n if (!result) return;\r\n this.#columns.set(result.columns);\r\n this.#steps.set([...result.steps]);\r\n this.#columnsReady.set(true);\r\n });\r\n }\r\n\r\n /** Runs the current request, switching away from any request still in flight. */\r\n #watchRequest(): void {\r\n toObservable(\r\n computed<RequestKey>(() => ({ request: this.#request(), tick: this.#tick() })),\r\n )\r\n .pipe(\r\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)),\r\n switchMap(({ request }) => {\r\n if (!request) {\r\n this.#loading.set(false);\r\n return of(null);\r\n }\r\n this.#loading.set(true);\r\n this.#error.set(undefined);\r\n return this.#repository.query(request).pipe(\r\n catchError(error => {\r\n this.#error.set(toQueryError(error));\r\n return of(null);\r\n }),\r\n );\r\n }),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe(page => {\r\n this.#loading.set(false);\r\n if (!page) {\r\n if (this.#error()) this.#rows.set([]);\r\n return;\r\n }\r\n this.#applyPage(page);\r\n });\r\n }\r\n\r\n /** Records a page and the cursor that reaches the page after it. */\r\n #applyPage(page: IDocumentPage): void {\r\n this.#rows.set(page.items ?? []);\r\n this.#hasMore.set(page.hasMore === true);\r\n\r\n // Totals come back on the first page only; hold on to them for later pages.\r\n if (typeof page.totalItems === 'number') this.#totalItems.set(page.totalItems);\r\n if (typeof page.totalPages === 'number') this.#totalPages.set(page.totalPages);\r\n\r\n const nextIndex = this.#pageIndex() + 1;\r\n const cursors = [...this.#cursors()];\r\n if (page.hasMore && page.nextCursor) {\r\n cursors[nextIndex] = page.nextCursor;\r\n } else {\r\n cursors.length = nextIndex;\r\n }\r\n this.#cursors.set(cursors);\r\n }\r\n}\r\n\r\n/** Shallow-compares two filters by their serialized form. */\r\nfunction sameFilter(a: Record<string, unknown>, b: Record<string, unknown>): boolean {\r\n return JSON.stringify(a) === JSON.stringify(b);\r\n}\r\n\r\n/** Classifies a thrown value so the UI knows whether retrying can help. */\r\nfunction toQueryError(error: unknown): DocumentQueryError {\r\n if (error instanceof DocumentPickerConfigurationError) {\r\n return { kind: 'configuration', message: error.message };\r\n }\r\n const message =\r\n (error as { error?: { message?: string } })?.error?.message ??\r\n (error instanceof Error ? error.message : 'Could not load transactions.');\r\n return { kind: 'query', message };\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ViewEncapsulation,\r\n computed,\r\n inject,\r\n signal,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { debounceTime, distinctUntilChanged, map } from 'rxjs';\r\n\r\nimport type { IDocumentReference, IWorkflowStepOption } from 'ngx-t-forms-types';\r\n\r\nimport type {\r\n DocumentBrowserDialogData,\r\n DocumentBrowserDialogResult,\r\n} from '../../../../../../domain/document-picker/document-browser-dialog.model';\r\nimport type { DocumentColumn } from '../../../../../../domain/document-picker/document-picker.model';\r\nimport { buildSelectionFilter } from '../../../../../../services/document-picker/document-filter';\r\nimport { readDocumentPath } from '../../../../../../services/document-picker/document-path';\r\nimport { DocumentQueryStore } from '../../../../../../services/document-picker/document-query.store';\r\nimport {\r\n readDocumentId,\r\n toDocumentReference,\r\n} from '../../../../../../services/document-picker/document-reference';\r\nimport { FormatDataPipe } from '../../../../../../shared/pipes/format-Data.pipe';\r\nimport { injectFormsLocalization } from '../../../../../../services/core/t-form-localization/inject-forms-localization';\r\n\r\n/** How long the search box waits after the last keystroke before querying. */\r\nconst SEARCH_DEBOUNCE_MS = 350;\r\n\r\n/** Page sizes offered in the footer. The active size is merged in when it differs. */\r\nconst PAGE_SIZE_OPTIONS: readonly number[] = [5, 10, 25, 50];\r\n\r\n/**\r\n * Root-level field naming the workflow step a transaction currently sits on. It is a\r\n * root field, so the document path is the field name itself — nothing is nested.\r\n */\r\nconst CURRENT_STEP_PATH = 'currentStepID';\r\n\r\n/**\r\n * Number of colour slots in the step palette (see `--dbd-step-hue-0…7` in the\r\n * stylesheet). A step's slot is its process-tree index modulo this count, so the\r\n * palette must not shrink without re-checking that adjacent steps stay distinguishable.\r\n */\r\nconst STEP_HUE_COUNT = 8;\r\n\r\n/** Direction a header cell reports to assistive technology. */\r\ntype AriaSort = 'ascending' | 'descending' | 'none';\r\n\r\n/** What the Step column renders for one row. */\r\ninterface StepPill {\r\n /** Text shown in the pill and repeated in its `title`. Never blank. */\r\n readonly label: string;\r\n /**\r\n * Palette slot, or `undefined` when the step is unknown and the pill is neutral.\r\n * Bound as `data-step-hue`, which the stylesheet turns into a tinted surface.\r\n */\r\n readonly hue: number | undefined;\r\n}\r\n\r\n/**\r\n * Modal browser for a workflow's transactions, opened by the document picker so the\r\n * user can find and link one — or several — cross-referenced documents.\r\n *\r\n * The dialog owns nothing but the user's in-progress selection: the query itself lives\r\n * in a per-instance {@link DocumentQueryStore}, so browsing (sorting, paging, searching,\r\n * step filtering) never touches the form control. The caller's value changes only when\r\n * the user confirms, and dismissing the dialog leaves it untouched.\r\n *\r\n * Selecting a row is deliberately inert: it mutates the local selection and nothing\r\n * else, so the list can never collapse or reload underneath the user mid-pick. To\r\n * review a selection spread across pages, the \"Selected\" toggle re-queries by\r\n * identifier instead.\r\n *\r\n * Opened with {@link DocumentBrowserDialogData} and closed with\r\n * {@link DocumentBrowserDialogResult}.\r\n *\r\n * @internal Opened by the document picker; not exported via public-api.ts.\r\n */\r\n@Component({\r\n selector: 'lib-document-browser-dialog',\r\n templateUrl: './document-browser-dialog.component.html',\r\n styleUrl: './document-browser-dialog.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: { 'class': 'lib-document-browser-dialog' },\r\n imports: [\r\n MatDialogModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n MatProgressSpinnerModule,\r\n FormatDataPipe,\r\n ],\r\n providers: [DocumentQueryStore],\r\n})\r\nexport class DocumentBrowserDialogComponent {\r\n /** Query state for this dialog only — provided per instance, never shared. */\r\n protected readonly store = inject(DocumentQueryStore);\r\n /** The consumer's localization, handed to `formatData` so a cell follows the organisation. */\r\n protected readonly l10n = injectFormsLocalization();\r\n\r\n readonly #data = inject<DocumentBrowserDialogData>(MAT_DIALOG_DATA);\r\n readonly #dialogRef =\r\n inject<MatDialogRef<DocumentBrowserDialogComponent, DocumentBrowserDialogResult>>(\r\n MatDialogRef,\r\n );\r\n readonly #destroyRef = inject(DestroyRef);\r\n\r\n /** Selection as the user has it right now; seeded from what is already linked. */\r\n readonly #selection = signal<readonly IDocumentReference[]>([...this.#data.selection]);\r\n /** Step the user chose to browse, or `undefined` for the picker's own step scope. */\r\n readonly #activeStepId = signal<string | undefined>(undefined);\r\n /** `true` while the list is filtered down to the selected documents. */\r\n readonly #selectedOnly = signal(false);\r\n /** Raw search box text, before debouncing. */\r\n readonly #searchTerm = signal('');\r\n\r\n /** Identifiers of the selected documents, for row-by-row comparison. */\r\n readonly #selectedIds = computed<ReadonlySet<string>>(\r\n () => new Set(this.#selection().map(entry => entry.id)),\r\n );\r\n\r\n /**\r\n * Steps keyed by identifier, so a row resolves its step with one map lookup instead\r\n * of scanning the step list on every change-detection pass.\r\n */\r\n readonly #stepsById = computed<ReadonlyMap<string, IWorkflowStepOption>>(\r\n () => new Map(this.store.steps().map(step => [step.stepId, step])),\r\n );\r\n\r\n /**\r\n * Column a reference is labelled by: the first searchable text column after\r\n * `reference`, which is the one a user recognises a transaction from.\r\n */\r\n readonly #labelColumn = computed<DocumentColumn | undefined>(() =>\r\n this.store.columns().find(column => column.searchable && column.path !== 'reference'),\r\n );\r\n\r\n /** Dialog heading — the picker's own label. */\r\n protected readonly title: string = this.#data.title;\r\n\r\n /** Whether more than one transaction may be linked. */\r\n protected readonly allowMultiple: boolean = this.#data.allowMultiple;\r\n\r\n /** Current search text, mirrored back into the input. */\r\n protected readonly searchTerm = this.#searchTerm.asReadonly();\r\n\r\n /** Step currently browsed, or `undefined` for \"Any step\". */\r\n protected readonly activeStepId = this.#activeStepId.asReadonly();\r\n\r\n /** `true` while the list shows only the selected documents. */\r\n protected readonly selectedOnly = this.#selectedOnly.asReadonly();\r\n\r\n /** Document path the Step column sorts on. */\r\n protected readonly stepPath: string = CURRENT_STEP_PATH;\r\n\r\n /**\r\n * Whether to render the Step column at all. Without the workflow's steps every pill\r\n * would read \"unknown\", which tells the user less than no column does — so when the\r\n * host has not implemented `getWorkflowSteps` the column is dropped, header included.\r\n */\r\n protected readonly showStepColumn = computed<boolean>(() => this.store.steps().length > 0);\r\n\r\n /** How many transactions are selected. */\r\n protected readonly selectedCount = computed<number>(() => this.#selection().length);\r\n\r\n /**\r\n * Whether to offer the step chooser. A picker locked to exactly one step has no\r\n * choice to make, so the control is not rendered at all.\r\n */\r\n protected readonly showStepChooser = computed<boolean>(\r\n () => this.#data.lockedStepIds.length !== 1 && this.store.steps().length > 0,\r\n );\r\n\r\n /**\r\n * Whether to offer the \"Selected\" filter. It stays visible while the filter is on\r\n * even after the last row is deselected, so the user is never stranded in a\r\n * filtered view with no way back.\r\n */\r\n protected readonly showSelectedFilter = computed<boolean>(\r\n () => this.selectedCount() > 0 || this.#selectedOnly(),\r\n );\r\n\r\n /** Page sizes offered, always including whichever size is currently in force. */\r\n protected readonly pageSizeOptions = computed<readonly number[]>(() =>\r\n [...new Set([...PAGE_SIZE_OPTIONS, this.store.pageSize()])].sort((a, b) => a - b),\r\n );\r\n\r\n /**\r\n * Position of the visible rows in the result set, e.g. `Showing 11–20 of 412`.\r\n * Keyset paging cannot always know the total, in which case the total is omitted\r\n * rather than guessed. Empty while there is nothing to place.\r\n */\r\n protected readonly positionLabel = computed<string>(() => {\r\n const count = this.store.rows().length;\r\n if (count === 0) return '';\r\n const start = this.store.pageIndex() * this.store.pageSize() + 1;\r\n const end = start + count - 1;\r\n const total = this.store.totalItems();\r\n return total === undefined\r\n ? `Showing ${start}–${end}`\r\n : `Showing ${start}–${end} of ${total}`;\r\n });\r\n\r\n constructor() {\r\n this.store.configure({\r\n workflowId: this.#data.workflowId,\r\n filter: this.#browseFilter(),\r\n pageSize: this.#data.pageSize,\r\n });\r\n\r\n // The store issues one request per term it is handed, so the debounce lives here.\r\n toObservable(this.#searchTerm)\r\n .pipe(\r\n debounceTime(SEARCH_DEBOUNCE_MS),\r\n map(term => term.trim()),\r\n distinctUntilChanged(),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe(term => this.store.setSearch(term));\r\n }\r\n\r\n /** Reads a cell's raw value from the stored document, which is never flattened. */\r\n protected cell(row: Record<string, unknown>, column: DocumentColumn): unknown {\r\n return readDocumentPath(row, column.path);\r\n }\r\n\r\n /** Stable identity for a row, falling back to its position when it carries no id. */\r\n protected rowKey(row: Record<string, unknown>, index: number): string {\r\n return readDocumentId(row, this.#data.identifierPath) ?? `row-${index}`;\r\n }\r\n\r\n /** `true` when a row is part of the current selection. */\r\n protected isSelected(row: Record<string, unknown>): boolean {\r\n const id = readDocumentId(row, this.#data.identifierPath);\r\n return id !== undefined && this.#selectedIds().has(id);\r\n }\r\n\r\n /** Accessible name for a row's selection control. */\r\n protected rowLabel(row: Record<string, unknown>): string {\r\n const reference = readDocumentPath(row, 'reference');\r\n const id = readDocumentId(row, this.#data.identifierPath);\r\n const name = reference == null || reference === '' ? id : String(reference);\r\n return name === undefined ? 'Select transaction' : `Select transaction ${name}`;\r\n }\r\n\r\n /**\r\n * Resolves the Step pill for one row.\r\n *\r\n * The colour is the step's `index` — its position in the workflow's process tree —\r\n * modulo {@link STEP_HUE_COUNT}. Tying it to the process tree, and never to the row's\r\n * position on the current page, is what makes a step the same colour on every row, on\r\n * every page and on every reopen: the same workflow always hands back the same index.\r\n *\r\n * Colour is only ever a second signal — the pill always carries the step's name.\r\n */\r\n protected stepPill(row: Record<string, unknown>): StepPill {\r\n const raw = readDocumentPath(row, CURRENT_STEP_PATH);\r\n const stepId =\r\n typeof raw === 'string' ? raw.trim() : typeof raw === 'number' ? String(raw) : '';\r\n\r\n const step = stepId === '' ? undefined : this.#stepsById().get(stepId);\r\n if (step === undefined) {\r\n // Say what is actually known: the raw id when the document carries one, and an\r\n // honest \"unknown\" when it does not. Never an empty pill.\r\n return { label: stepId === '' ? 'Unknown step' : stepId, hue: undefined };\r\n }\r\n\r\n // The contract types `label` as a string, but the host supplies it: a workflow with\r\n // an unnamed step must still produce a pill, so fall back to the id rather than\r\n // rendering nothing.\r\n const label = typeof step.label === 'string' ? step.label.trim() : '';\r\n return {\r\n label: label === '' ? step.stepId : label,\r\n hue: stepHue(step.index),\r\n };\r\n }\r\n\r\n /**\r\n * `true` when a document path is the one currently sorted on.\r\n *\r\n * Path-based rather than column-based because the Step column is not part of\r\n * `store.columns()`; the column-facing helpers delegate here so both share one rule.\r\n */\r\n protected isSortedPath(path: string): boolean {\r\n return this.store.sort().path === path;\r\n }\r\n\r\n /** `true` when a column is the one currently sorted on. */\r\n protected isSorted(column: DocumentColumn): boolean {\r\n return this.isSortedPath(column.path);\r\n }\r\n\r\n /** Sort state a header cell reports; only the active path reports a direction. */\r\n protected ariaSortPath(path: string): AriaSort {\r\n if (!this.isSortedPath(path)) return 'none';\r\n return this.store.sort().direction === 1 ? 'ascending' : 'descending';\r\n }\r\n\r\n /** Sort state a column's header cell reports. */\r\n protected ariaSort(column: DocumentColumn): AriaSort {\r\n return this.ariaSortPath(column.path);\r\n }\r\n\r\n /** Glyph for the active sort direction. */\r\n protected sortIcon(): string {\r\n return this.store.sort().direction === 1 ? 'arrow_upward' : 'arrow_downward';\r\n }\r\n\r\n /** Sorts by a document path, flipping direction when it is already the active one. */\r\n protected sortByPath(path: string): void {\r\n this.store.setSort(path);\r\n }\r\n\r\n /** Sorts by a column, flipping direction when it is already the active one. */\r\n protected sortBy(column: DocumentColumn): void {\r\n this.sortByPath(column.path);\r\n }\r\n\r\n /**\r\n * Adds or removes a row from the selection. Multi-select toggles; single-select\r\n * replaces, because a radio cannot be unset by re-clicking it — \"Clear\" is how a\r\n * single selection is undone.\r\n */\r\n protected toggleRow(row: Record<string, unknown>): void {\r\n const reference = toDocumentReference(row, {\r\n workflowId: this.#data.workflowId,\r\n identifierPath: this.#data.identifierPath,\r\n labelColumn: this.#labelColumn(),\r\n });\r\n if (!reference) return;\r\n\r\n if (!this.#data.allowMultiple) {\r\n this.#selection.set([reference]);\r\n return;\r\n }\r\n\r\n this.#selection.update(current => {\r\n const without = current.filter(entry => entry.id !== reference.id);\r\n return without.length === current.length ? [...current, reference] : without;\r\n });\r\n }\r\n\r\n /** Drops the whole selection without disturbing the list. */\r\n protected clearSelection(): void {\r\n this.#selection.set([]);\r\n }\r\n\r\n /**\r\n * Switches between browsing and reviewing the selection. Reviewing queries by\r\n * identifier over the picker's own filter, so a selected transaction is found\r\n * whatever page — or step — it currently sits on.\r\n */\r\n protected toggleSelectedOnly(): void {\r\n this.#selectedOnly.update(active => !active);\r\n this.#applyFilter();\r\n }\r\n\r\n /** Records the search box's text; the query follows once typing settles. */\r\n protected onSearch(event: Event): void {\r\n this.#searchTerm.set((event.target as HTMLInputElement).value);\r\n }\r\n\r\n /** Clears the search box, restoring the unsearched list. */\r\n protected clearSearch(): void {\r\n this.#searchTerm.set('');\r\n }\r\n\r\n /** Restores the picker's own step scope after the user narrowed to one step. */\r\n protected clearStep(): void {\r\n if (this.#activeStepId() === undefined) return;\r\n this.#activeStepId.set(undefined);\r\n this.#applyFilter();\r\n }\r\n\r\n /** Narrows the browse to one step, or restores the picker's own step scope. */\r\n protected onStepChange(event: Event): void {\r\n const value = (event.target as HTMLSelectElement).value;\r\n this.#activeStepId.set(value === '' ? undefined : value);\r\n this.#applyFilter();\r\n }\r\n\r\n /** Changes how many rows a page holds, returning to the first page. */\r\n protected onPageSizeChange(event: Event): void {\r\n const size = Number((event.target as HTMLSelectElement).value);\r\n if (Number.isFinite(size)) this.store.setPageSize(size);\r\n }\r\n\r\n /** Re-issues the failed request. Only offered for failures retrying can fix. */\r\n protected retry(): void {\r\n this.store.refresh();\r\n }\r\n\r\n /** Dismisses without touching the caller's value. */\r\n protected cancel(): void {\r\n this.#dialogRef.close(undefined);\r\n }\r\n\r\n /** Closes, handing the selection back to the picker. */\r\n protected confirm(): void {\r\n this.#dialogRef.close(this.#selection());\r\n }\r\n\r\n /** The picker's filter plus whichever step the user chose to browse. */\r\n #browseFilter(): Record<string, unknown> {\r\n const stepId = this.#activeStepId();\r\n return stepId ? { ...this.#data.filter, currentStep: stepId } : { ...this.#data.filter };\r\n }\r\n\r\n /** The filter the list should currently run under. */\r\n #currentFilter(): Record<string, unknown> {\r\n if (this.#selectedOnly()) {\r\n const ids = this.#selection().map(entry => entry.id);\r\n const selectionFilter = buildSelectionFilter(ids, this.#data.identifierPath);\r\n if (selectionFilter) return { ...this.#data.filter, ...selectionFilter };\r\n }\r\n return this.#browseFilter();\r\n }\r\n\r\n /** Re-points the store at the filter in force, keeping the user's page size. */\r\n #applyFilter(): void {\r\n this.store.configure({\r\n workflowId: this.#data.workflowId,\r\n filter: this.#currentFilter(),\r\n pageSize: this.store.pageSize(),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Maps a step's process-tree index onto a palette slot.\r\n *\r\n * The modulo is normalised so a negative or fractional index — which a malformed\r\n * workflow can produce — still lands on a real slot instead of yielding `NaN` or a\r\n * negative attribute value that no stylesheet rule would match.\r\n *\r\n * @param index - Zero-based position of the step in the workflow's process tree.\r\n * @returns A slot in `0…STEP_HUE_COUNT - 1`.\r\n */\r\nfunction stepHue(index: number): number {\r\n const whole = Number.isFinite(index) ? Math.trunc(index) : 0;\r\n return ((whole % STEP_HUE_COUNT) + STEP_HUE_COUNT) % STEP_HUE_COUNT;\r\n}\r\n","<div class=\"dbd__header\">\r\n <span class=\"dbd__header-icon\" aria-hidden=\"true\">\r\n <mat-icon>link</mat-icon>\r\n </span>\r\n <div class=\"dbd__heading\">\r\n <h2 mat-dialog-title class=\"dbd__title\">{{ title }}</h2>\r\n <p class=\"dbd__subtitle\">\r\n @if (allowMultiple) {\r\n Search the workflow and pick every transaction this form should reference.\r\n } @else {\r\n Search the workflow and pick the transaction this form should reference.\r\n }\r\n </p>\r\n </div>\r\n</div>\r\n\r\n<mat-dialog-content class=\"dbd__content\">\r\n <div class=\"dbd__controls\">\r\n <label class=\"dbd-field dbd-field--grow\">\r\n <span class=\"dbd-field__label\">Search</span>\r\n <input\r\n class=\"dbd-field__control\"\r\n type=\"search\"\r\n autocomplete=\"off\"\r\n placeholder=\"Reference, description…\"\r\n [value]=\"searchTerm()\"\r\n (input)=\"onSearch($event)\" />\r\n </label>\r\n\r\n @if (showStepChooser()) {\r\n <label class=\"dbd-field\">\r\n <span class=\"dbd-field__label\">Step</span>\r\n <select\r\n class=\"dbd-field__control\"\r\n [disabled]=\"selectedOnly()\"\r\n (change)=\"onStepChange($event)\">\r\n <option value=\"\" [selected]=\"activeStepId() === undefined\">Any step</option>\r\n @for (step of store.steps(); track step.stepId) {\r\n <option [value]=\"step.stepId\" [selected]=\"step.stepId === activeStepId()\">\r\n {{ step.label }}\r\n </option>\r\n }\r\n </select>\r\n </label>\r\n }\r\n </div>\r\n\r\n @if (showSelectedFilter()) {\r\n <div class=\"dbd__selection\">\r\n <button\r\n type=\"button\"\r\n class=\"dbd-toggle\"\r\n [class.dbd-toggle--on]=\"selectedOnly()\"\r\n [attr.aria-pressed]=\"selectedOnly()\"\r\n (click)=\"toggleSelectedOnly()\">\r\n <mat-icon class=\"dbd-toggle__icon\" aria-hidden=\"true\">\r\n {{ selectedOnly() ? 'visibility' : 'filter_list' }}\r\n </mat-icon>\r\n <span>Selected ({{ selectedCount() }})</span>\r\n </button>\r\n\r\n @if (selectedCount() > 0) {\r\n <button type=\"button\" class=\"dbd-clear\" (click)=\"clearSelection()\">Clear</button>\r\n }\r\n\r\n @if (selectedOnly()) {\r\n <span class=\"dbd__selection-hint\">Showing only what you have picked.</span>\r\n }\r\n </div>\r\n }\r\n\r\n @if (store.error(); as error) {\r\n <div class=\"dbd-alert\" role=\"alert\">\r\n <mat-icon class=\"dbd-alert__icon\" aria-hidden=\"true\">error_outline</mat-icon>\r\n <div class=\"dbd-alert__body\">\r\n <p class=\"dbd-alert__message\">{{ error.message }}</p>\r\n @if (error.kind === 'configuration') {\r\n <p class=\"dbd-alert__hint\">\r\n This picker cannot run as it is set up, so retrying will not help. A form\r\n builder or the host application needs to correct it.\r\n </p>\r\n }\r\n </div>\r\n @if (error.kind === 'query') {\r\n <button matButton=\"outlined\" type=\"button\" class=\"dbd-alert__retry\" (click)=\"retry()\">\r\n Retry\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"dbd__table-wrap\">\r\n <div class=\"dbd__table-scroll\">\r\n <!-- role=\"table\", not \"grid\": grid promises two-dimensional arrow-key\r\n navigation, which this list does not implement. Each row's own control\r\n is focusable and every header is a real button, so the table stays fully\r\n keyboard-operable under the simpler role. -->\r\n <table role=\"table\" class=\"dbd-table\" [attr.aria-label]=\"title\">\r\n <thead class=\"dbd-table__head\">\r\n <tr role=\"row\">\r\n <th role=\"columnheader\" scope=\"col\" class=\"dbd-table__pick\">\r\n <span class=\"dbd-sr-only\">Select</span>\r\n </th>\r\n <!--\r\n Step sits ahead of the workflow's own columns and is not one of them: it\r\n reads the transaction's root `currentStepID`, so it is sorted by path\r\n rather than by a DocumentColumn. Hidden entirely when the host cannot\r\n supply the workflow's steps.\r\n -->\r\n @if (showStepColumn()) {\r\n <th\r\n role=\"columnheader\"\r\n scope=\"col\"\r\n class=\"dbd-table__step\"\r\n [attr.aria-sort]=\"ariaSortPath(stepPath)\">\r\n <button\r\n type=\"button\"\r\n class=\"dbd-sort\"\r\n [class.dbd-sort--active]=\"isSortedPath(stepPath)\"\r\n (click)=\"sortByPath(stepPath)\">\r\n <span class=\"dbd-sort__label\">Step</span>\r\n @if (isSortedPath(stepPath)) {\r\n <mat-icon class=\"dbd-sort__icon\" aria-hidden=\"true\">{{ sortIcon() }}</mat-icon>\r\n }\r\n </button>\r\n </th>\r\n }\r\n @for (column of store.columns(); track column.key) {\r\n <th role=\"columnheader\" scope=\"col\" [attr.aria-sort]=\"ariaSort(column)\">\r\n <button\r\n type=\"button\"\r\n class=\"dbd-sort\"\r\n [class.dbd-sort--active]=\"isSorted(column)\"\r\n (click)=\"sortBy(column)\">\r\n <span class=\"dbd-sort__label\">{{ column.label }}</span>\r\n @if (isSorted(column)) {\r\n <mat-icon class=\"dbd-sort__icon\" aria-hidden=\"true\">{{ sortIcon() }}</mat-icon>\r\n }\r\n </button>\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n @for (row of store.rows(); track rowKey(row, $index)) {\r\n <tr\r\n role=\"row\"\r\n class=\"dbd-row\"\r\n [class.dbd-row--selected]=\"isSelected(row)\"\r\n [attr.aria-selected]=\"isSelected(row)\"\r\n (click)=\"toggleRow(row)\">\r\n <td class=\"dbd-table__pick\">\r\n @if (allowMultiple) {\r\n <input\r\n class=\"dbd-pick\"\r\n type=\"checkbox\"\r\n [checked]=\"isSelected(row)\"\r\n [attr.aria-label]=\"rowLabel(row)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"toggleRow(row)\" />\r\n } @else {\r\n <input\r\n class=\"dbd-pick\"\r\n type=\"radio\"\r\n name=\"dbd-selection\"\r\n [checked]=\"isSelected(row)\"\r\n [attr.aria-label]=\"rowLabel(row)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"toggleRow(row)\" />\r\n }\r\n </td>\r\n @if (showStepColumn()) {\r\n @let pill = stepPill(row);\r\n <td class=\"dbd-cell dbd-table__step\">\r\n <!--\r\n The step's name is always the pill's text: the tint is a scanning\r\n aid, never the only way to tell one step from another.\r\n -->\r\n <span\r\n class=\"dbd-pill\"\r\n [class.dbd-pill--unknown]=\"pill.hue === undefined\"\r\n [attr.data-step-hue]=\"pill.hue\"\r\n [title]=\"pill.label\"\r\n >{{ pill.label }}</span\r\n >\r\n </td>\r\n }\r\n @for (column of store.columns(); track column.key) {\r\n <td class=\"dbd-cell\">\r\n <span class=\"dbd-cell__text\">\r\n {{ cell(row, column) | formatData: column.type : undefined : l10n() }}\r\n </span>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n\r\n @if (store.isEmpty()) {\r\n <!--\r\n Never a bare \"no results\": name why the list is empty and offer the\r\n control that undoes it, so the user is not left guessing which of the\r\n search, the step or the field's own filters excluded everything.\r\n -->\r\n <div class=\"dbd-empty\">\r\n <mat-icon class=\"dbd-empty__icon\" aria-hidden=\"true\">search_off</mat-icon>\r\n\r\n @if (selectedOnly()) {\r\n <p class=\"dbd-empty__title\">Nothing picked yet</p>\r\n <p class=\"dbd-empty__hint\">\r\n Switch off <strong>Selected</strong> to browse the workflow and pick\r\n {{ allowMultiple ? 'transactions' : 'a transaction' }}.\r\n </p>\r\n } @else if (searchTerm()) {\r\n <p class=\"dbd-empty__title\">No transactions match “{{ searchTerm() }}”</p>\r\n <p class=\"dbd-empty__hint\">\r\n Search covers the reference and the columns shown above. Check the spelling,\r\n or try a shorter term.\r\n </p>\r\n } @else if (activeStepId()) {\r\n <p class=\"dbd-empty__title\">No transactions are at this step</p>\r\n <p class=\"dbd-empty__hint\">\r\n Every transaction has moved on, or none has reached it yet. Try another step.\r\n </p>\r\n } @else {\r\n <p class=\"dbd-empty__title\">No transactions to show</p>\r\n <p class=\"dbd-empty__hint\">\r\n This workflow has no transactions yet, or this field is set up to show only\r\n some of them. If you expected results here, ask an administrator to check the\r\n field's filters.\r\n </p>\r\n }\r\n\r\n <div class=\"dbd-empty__actions\">\r\n @if (searchTerm()) {\r\n <button type=\"button\" class=\"dbd-step\" (click)=\"clearSearch()\">Clear search</button>\r\n }\r\n @if (activeStepId()) {\r\n <button type=\"button\" class=\"dbd-step\" (click)=\"clearStep()\">Show all steps</button>\r\n }\r\n @if (selectedOnly()) {\r\n <button type=\"button\" class=\"dbd-step\" (click)=\"toggleSelectedOnly()\">\r\n Back to browsing\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (store.loading()) {\r\n <div class=\"dbd__overlay\" role=\"status\" aria-live=\"polite\">\r\n <mat-spinner [diameter]=\"32\" />\r\n <span class=\"dbd-sr-only\">Loading transactions</span>\r\n </div>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n\r\n<!--\r\n Pinned footer. Paging and the confirm actions sit outside the scroll region so\r\n they stay reachable however many rows are loaded.\r\n-->\r\n<div class=\"dbd__footer\">\r\n <div class=\"dbd__paging\">\r\n <p class=\"dbd__position\" aria-live=\"polite\">{{ positionLabel() }}</p>\r\n\r\n <div class=\"dbd__paging-controls\">\r\n <label class=\"dbd-field dbd-field--inline\">\r\n <span class=\"dbd-field__label\">Rows</span>\r\n <select\r\n class=\"dbd-field__control dbd-field__control--compact\"\r\n (change)=\"onPageSizeChange($event)\">\r\n @for (size of pageSizeOptions(); track size) {\r\n <option value=\"{{ size }}\" [selected]=\"size === store.pageSize()\">{{ size }}</option>\r\n }\r\n </select>\r\n </label>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"dbd-step\"\r\n [disabled]=\"!store.canGoPrevious()\"\r\n (click)=\"store.previousPage()\">\r\n <mat-icon class=\"dbd-step__icon\" aria-hidden=\"true\">chevron_left</mat-icon>\r\n <span>Previous</span>\r\n </button>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"dbd-step\"\r\n [disabled]=\"!store.canGoNext()\"\r\n (click)=\"store.nextPage()\">\r\n <span>Next</span>\r\n <mat-icon class=\"dbd-step__icon\" aria-hidden=\"true\">chevron_right</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <mat-dialog-actions class=\"dbd__actions\">\r\n <button matButton type=\"button\" (click)=\"cancel()\">Cancel</button>\r\n <button matButton=\"filled\" type=\"button\" (click)=\"confirm()\">Done</button>\r\n </mat-dialog-actions>\r\n</div>\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n ViewEncapsulation,\r\n computed,\r\n inject,\r\n input,\r\n signal,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { take } from 'rxjs';\r\n\r\nimport type { FormColumnInputs, IDocumentReference } from 'ngx-t-forms-types';\r\n\r\nimport type {\r\n DocumentBrowserDialogData,\r\n DocumentBrowserDialogResult,\r\n} from '../../../../../../domain/document-picker/document-browser-dialog.model';\r\nimport { DEFAULT_DOCUMENT_PAGE_SIZE } from '../../../../../../domain/document-picker/document-picker.model';\r\nimport { TFormEngine } from '../../../../../../services/core/t-form-engine/t-form-engine';\r\nimport {\r\n BaseCustomInput,\r\n BaseCustomInputConfig,\r\n} from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\nimport { buildDocumentFilter } from '../../../../../../services/document-picker/document-filter';\r\nimport {\r\n readDocumentReferences,\r\n resolveIdentifierPath,\r\n writeDocumentValue,\r\n} from '../../../../../../services/document-picker/document-reference';\r\nimport { DocumentBrowserDialogComponent } from '../document-browser-dialog/document-browser-dialog.component';\r\n\r\n/**\r\n * The value a document-picker control holds: one reference when the input links a\r\n * single transaction, a list when it allows several. Exported because it appears in\r\n * this component's base-class type argument; it is not part of the library's\r\n * public API surface.\r\n */\r\nexport type DocumentPickerValue = IDocumentReference | readonly IDocumentReference[];\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-document-picker-reactive-input',\r\n nextId: 0,\r\n};\r\n\r\n/**\r\n * Compact summary of the transactions a form field links to: one chip per linked\r\n * transaction plus a button that opens the browse dialog.\r\n *\r\n * The field itself queries nothing. Every reference it renders comes from the form\r\n * control, and every change comes back from {@link DocumentBrowserDialogComponent},\r\n * which owns searching, paging and step filtering. Display state is derived from the\r\n * control value alone — deliberately never from `stateChanges`, which also fires on\r\n * focus, blur, touch and `disabled` and previously turned every focus change into a\r\n * fresh round of network requests.\r\n *\r\n * @example\r\n * <lib-document-picker-reactive-input [inputConfig]=\"config\" [formControlName]=\"config.id\" />\r\n */\r\n@Component({\r\n selector: 'lib-document-picker-reactive-input',\r\n templateUrl: './document-picker-reactive-input.component.html',\r\n styleUrl: './document-picker-reactive-input.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [MatIconModule],\r\n host: {\r\n 'class': 'lib-document-picker-input',\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n '(focusin)': 'onFocusIn($event)',\r\n '(focusout)': 'onFocusOut($event)',\r\n },\r\n // `useExisting` is banned for the library's own DI (CLAUDE.md §3), but Material's\r\n // form-field contract requires `MatFormFieldControl` to resolve to *this component\r\n // instance*: `useClass` would construct a second, unbound control. Accepted\r\n // exception, matching every other custom input in this library.\r\n providers: [{ provide: MatFormFieldControl, useExisting: DocumentPickerReactiveInputComponent }],\r\n})\r\nexport class DocumentPickerReactiveInputComponent extends BaseCustomInput<DocumentPickerValue> {\r\n /** Builder configuration for this field: workflow, filters and selection mode. */\r\n readonly inputConfig = input<FormColumnInputs | undefined>(undefined);\r\n\r\n /** Line shown while nothing is linked. */\r\n readonly emptyMessage = input<string>('No transactions linked');\r\n\r\n readonly #dialog = inject(MatDialog);\r\n readonly #destroyRef = inject(DestroyRef);\r\n\r\n /**\r\n * The form engine this picker is rendered inside, when there is one.\r\n *\r\n * Optional by necessity: the picker also renders in the builder's element preview\r\n * and in portal-hosted contexts, where no engine is provided. Those keep the\r\n * form-group fallback in {@link DocumentPickerReactiveInputComponent.#dependencyValues}.\r\n */\r\n readonly #engine = inject(TFormEngine, { optional: true });\r\n\r\n /**\r\n * Signal mirror of the control value. `BaseCustomInput` keeps the value on a plain\r\n * field, so both write paths are overridden to feed this: {@link writeValue}, which\r\n * the form uses, and the `value` setter, which every user edit goes through. That\r\n * keeps the template reactive under OnPush without observing `stateChanges` — which\r\n * also fires on focus, blur and touch, and has no business redrawing this field.\r\n */\r\n readonly #value = signal<DocumentPickerValue | null>(null);\r\n\r\n /** Disabled state pushed by the reactive form, e.g. `control.disable()`. */\r\n readonly #formDisabled = signal<boolean>(false);\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { self: true, optional: true }) as NgControl,\r\n inject<ElementRef<HTMLElement>>(ElementRef),\r\n customInputConfig,\r\n );\r\n }\r\n\r\n /** References parsed out of the stored value, with the count it could not read. */\r\n readonly #readResult = computed(() => readDocumentReferences(this.#value()));\r\n\r\n /** Transactions currently linked, in stored order. */\r\n protected readonly references = computed<readonly IDocumentReference[]>(\r\n () => this.#readResult().references,\r\n );\r\n\r\n /** Stored entries that are not readable as references — surfaced, never dropped. */\r\n protected readonly unreadable = computed<number>(() => this.#readResult().unreadable);\r\n\r\n /** Whether this field links more than one transaction. */\r\n protected readonly allowMultiple = computed<boolean>(\r\n () => this.inputConfig()?.allowMultipleSelection === true,\r\n );\r\n\r\n /** Workflow whose transactions this field browses; empty when unconfigured. */\r\n readonly #workflowId = computed<string>(\r\n () => this.inputConfig()?.workflowPickerConfig?.workflowId ?? '',\r\n );\r\n\r\n /** `true` when the field accepts no edits — disabled by the form or by configuration. */\r\n protected readonly interactionLocked = computed<boolean>(() => {\r\n const config = this.inputConfig();\r\n return this.#formDisabled() || config?.disabled === true || config?.readonly === true;\r\n });\r\n\r\n /** `true` when the builder never chose a workflow, so there is nothing to browse. */\r\n protected readonly unconfigured = computed<boolean>(() => this.#workflowId() === '');\n\n /**\n * A read-only view of the record (`readonly: true`), as opposed to a field\n * merely disabled in a live form. Only this flattens the chips and drops the\n * unlink button; a disabled field keeps its disabled unlink button as before.\n */\n protected readonly readOnlyView = computed<boolean>(() => this.inputConfig()?.readonly === true);\r\n\r\n /** `true` when the browse dialog can actually be opened. */\r\n protected readonly canBrowse = computed<boolean>(\r\n () => !this.interactionLocked() && !this.unconfigured(),\r\n );\r\n\r\n /** Browse-button wording: replacing a single link reads differently from adding one. */\r\n protected readonly browseLabel = computed<string>(() =>\r\n !this.allowMultiple() && this.references().length > 0 ? 'Change' : 'Browse transactions',\r\n );\r\n\r\n /**\r\n * `true` when the empty field should spell out how to fill it.\r\n *\r\n * Withheld when the field is read-only or has no workflow configured: in both cases\r\n * the reader cannot act on the instructions, and telling them to press a button that\r\n * is absent or disabled is worse than saying nothing.\r\n */\r\n protected readonly showSteps = computed<boolean>(\r\n () => !this.interactionLocked() && !this.unconfigured(),\r\n );\r\n\r\n /**\r\n * Calm one-liner naming how many stored links could not be read. Editable, it\r\n * leads into the call to re-link; read-only it is a neutral statement of fact,\r\n * because nobody viewing a read-only record can act on it.\r\n */\r\n protected readonly unreadableMessage = computed<string>(() => {\r\n const count = this.unreadable();\r\n if (this.interactionLocked()) {\r\n return count === 1\r\n ? 'Linked record unavailable (older format)'\r\n : `${count} linked records unavailable (older format)`;\r\n }\r\n return `${count} saved ${count === 1 ? 'link' : 'links'} could not be read`;\r\n });\r\n\r\n /** Current control value. */\r\n override get value(): DocumentPickerValue | null {\r\n return super.value;\r\n }\r\n\r\n /**\r\n * Sets the control value, keeping the signal mirror in step with it.\r\n *\r\n * The mirror is updated first so anything reacting to the base setter's\r\n * `stateChanges` — `empty`, for one — already sees the new selection.\r\n */\r\n override set value(next: DocumentPickerValue | null) {\r\n this.#value.set(next);\r\n super.value = next;\r\n }\r\n\r\n /** `true` when no transaction is linked, so the Material label floats correctly. */\r\n override get empty(): boolean {\r\n return this.references().length === 0;\r\n }\r\n\r\n /** Always floats: the field renders chips, not text, so there is nothing to overlap. */\r\n override get shouldLabelFloat(): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Accepts a value from the form and mirrors it into the signal the template reads.\r\n *\r\n * @param value - Stored value; `null` whenever the control is reset.\r\n */\r\n override writeValue(value: DocumentPickerValue): void {\r\n super.writeValue(value);\r\n this.#value.set(value ?? null);\r\n }\r\n\r\n /**\r\n * Records the form's disabled state so the template can react to it.\r\n *\r\n * @param isDisabled - `true` while the control is disabled.\r\n */\r\n override setDisabledState(isDisabled: boolean): void {\r\n super.setDisabledState(isDisabled);\r\n this.#formDisabled.set(isDisabled);\r\n }\r\n\r\n /**\r\n * A chip's leading text: the human reference, else the descriptive label, else the\r\n * raw id. The fallback order matters — a chip should only show an internal id when\r\n * there is genuinely nothing human to show.\r\n */\r\n protected chipReference(reference: IDocumentReference): string {\r\n return reference.reference || reference.label || reference.id;\r\n }\r\n\r\n /**\r\n * A chip's trailing text — the descriptive label shown beside the reference, so a\r\n * linked transaction reads as \"SDBIP-0197 · Machinery and Equipment\" rather than a\r\n * bare code the user has to recognise from memory.\r\n *\r\n * Empty unless it adds something: when there is no `reference` the label is already\r\n * the leading text ({@link chipReference}), and a label identical to the reference\r\n * would just be printed twice.\r\n */\r\n protected chipDetail(reference: IDocumentReference): string {\r\n const label = reference.label?.trim() ?? '';\r\n if (!reference.reference || label === '' || label === reference.reference) return '';\r\n return label;\r\n }\r\n\r\n /** The chip as one line of text — for the unlink button's accessible name. */\r\n protected chipLabel(reference: IDocumentReference): string {\r\n const detail = this.chipDetail(reference);\r\n const lead = this.chipReference(reference);\r\n return detail === '' ? lead : `${lead} — ${detail}`;\r\n }\r\n\r\n /**\r\n * Unlinks one transaction.\r\n *\r\n * @param index - Position of the chip in {@link references}.\r\n */\r\n protected removeReference(index: number): void {\r\n if (this.interactionLocked()) return;\r\n this.commitSelection(this.references().filter((_, position) => position !== index));\r\n }\r\n\r\n /**\r\n * Opens the browse dialog and applies whatever selection it comes back with.\r\n * A dismissal returns `undefined` and leaves the stored links untouched.\r\n */\r\n protected openBrowser(): void {\r\n if (!this.canBrowse()) return;\r\n const data = this.#buildDialogData();\r\n if (!data) return;\r\n\r\n this.#dialog\r\n .open<DocumentBrowserDialogComponent, DocumentBrowserDialogData, DocumentBrowserDialogResult>(\r\n DocumentBrowserDialogComponent,\r\n {\r\n data,\r\n autoFocus: false,\r\n restoreFocus: true,\r\n // An explicit height is load-bearing, not cosmetic: the dialog is a flex\r\n // column whose table is the only scroll region, and that resolves only\r\n // against a definite panel height. Without it the footer is pushed below\r\n // the fold and the panel itself scrolls.\r\n width: 'min(60rem, 94vw)',\r\n maxWidth: '94vw',\r\n height: 'min(42rem, 86vh)',\r\n },\r\n )\r\n .afterClosed()\r\n .pipe(take(1), takeUntilDestroyed(this.#destroyRef))\r\n .subscribe((result) => {\r\n if (result === undefined) return;\r\n this.commitSelection(result);\r\n });\r\n }\r\n\r\n /**\r\n * Writes a new selection to the form control.\r\n *\r\n * Only one change notification is emitted: `BaseCustomInput`'s `value` setter\r\n * already calls `onChange`, so this deliberately assigns through that setter\r\n * instead of calling `onChange` a second time. `onTouched` is called explicitly —\r\n * choosing (or clearing) a link is the interaction that makes the field touched.\r\n *\r\n * @param references - The selection as the user left it.\r\n */\r\n protected commitSelection(references: readonly IDocumentReference[]): void {\r\n this.value = writeDocumentValue(references, this.allowMultiple());\r\n this.onTouched();\r\n }\r\n\r\n /** Assembles everything the browse dialog needs, or nothing when unconfigured. */\r\n #buildDialogData(): DocumentBrowserDialogData | undefined {\r\n const config = this.inputConfig();\r\n const pickerConfig = config?.workflowPickerConfig;\r\n if (!config || !pickerConfig?.workflowId) return undefined;\r\n\r\n const lockedStepIds = pickerConfig.stepFilter?.stepIds ?? [];\r\n return {\r\n workflowId: pickerConfig.workflowId,\r\n title: config.label || 'Transactions',\r\n filter: buildDocumentFilter({\r\n presetFilters: pickerConfig.presetFilters,\r\n lockedStepIds,\r\n formValue: this.#dependencyValues(),\r\n }),\r\n lockedStepIds,\r\n allowMultiple: this.allowMultiple(),\r\n identifierPath: resolveIdentifierPath(pickerConfig.primaryIdentifierKey),\r\n pageSize: DEFAULT_DOCUMENT_PAGE_SIZE,\r\n selection: this.references(),\r\n };\r\n }\r\n\r\n /**\r\n * The values a preset filter bound to a sibling input reads from, keyed by input id.\r\n *\r\n * Sourced from the engine rather than the surrounding `FormGroup`, because the two\r\n * disagree in three ways that all surface as the same silent bug — a browse dialog\r\n * that opens empty because a clause matched nothing:\r\n *\r\n * - **Scope.** `formGenerator` nests the form as root → one group per section →\r\n * controls, so `control.parent` is this picker's OWN section. A filter bound to an\r\n * input on another slide read `undefined` forever, even though the builder's input\r\n * selector happily offers those inputs. The engine's value is flat and whole-form.\r\n * - **Disabled controls.** `FormGroup.value` omits them (`getRawValue()` does not).\r\n * That silently excluded exactly the fields worth filtering by — calculated and\r\n * read-only ones. The engine's value never consulted the disabled flag.\r\n * - **Derived values.** A calculated or API-fetched value lives in the engine's\r\n * `#derived` graph; so do MultipleInput sub-row and mSCOA inner-input values. The\r\n * section group exposes none of them usefully.\r\n *\r\n * Both sources key by input id, which is what `fromInputId` stores, so nothing is\r\n * translated. Ids are unique per form — the engine's own flat maps already rely on\r\n * that — so flattening across slides introduces no collision.\r\n *\r\n * The fallback is not dead code: with no engine in scope this reproduces the previous\r\n * behaviour exactly, which is the right answer for a preview that has no live form.\r\n */\r\n #dependencyValues(): Record<string, unknown> | undefined {\r\n const fromEngine = this.#engine?.getFormValue();\r\n if (isValueRecord(fromEngine)) return fromEngine;\r\n return isValueRecord(this.ngControl?.control?.parent?.value)\r\n ? (this.ngControl?.control?.parent?.value as Record<string, unknown>)\r\n : undefined;\r\n }\r\n}\r\n\r\n/** `true` for a plain object usable as an inputId-keyed value map. */\r\nfunction isValueRecord(value: unknown): value is Record<string, unknown> {\r\n return value != null && typeof value === 'object' && !Array.isArray(value);\r\n}\r\n","<!--\r\n The `lib-document-picker-reactive-input` class is the element `BaseCustomInput`\r\n looks up to apply `aria-describedby`, so it must stay on this container.\r\n-->\r\n<div class=\"lib-document-picker-reactive-input doc-link\" [class.doc-link--readonly]=\"readOnlyView()\">\r\n @if (references().length > 0) {\r\n <!-- Linked: chips and the browse action share one wrapping row. -->\r\n <div class=\"doc-link__row\">\r\n <ul class=\"doc-link__chips\">\r\n @for (reference of references(); track $index) {\r\n <li class=\"doc-link__chip\">\r\n <mat-icon class=\"doc-link__chip-icon\" aria-hidden=\"true\">description</mat-icon>\r\n <span class=\"doc-link__chip-label\">{{ chipReference(reference) }}</span>\r\n @if (chipDetail(reference); as detail) {\r\n <span class=\"doc-link__chip-detail\" [title]=\"detail\">{{ detail }}</span>\r\n }\r\n <!-- Read-only shows the link as a fact: no unlink affordance, not even a disabled one.\r\n A field merely disabled in a live form keeps its disabled button. -->\r\n @if (!readOnlyView()) {\r\n <button\r\n type=\"button\"\r\n class=\"doc-link__chip-remove\"\r\n [disabled]=\"interactionLocked()\"\r\n [attr.aria-label]=\"'Unlink ' + chipLabel(reference)\"\r\n (click)=\"removeReference($index)\"\r\n >\r\n <mat-icon aria-hidden=\"true\">close</mat-icon>\r\n </button>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n\r\n @if (!interactionLocked()) {\r\n <button\r\n type=\"button\"\r\n class=\"doc-link__browse\"\r\n [disabled]=\"!canBrowse()\"\r\n (click)=\"openBrowser()\"\r\n >\r\n <mat-icon class=\"doc-link__browse-icon\" aria-hidden=\"true\">search</mat-icon>\r\n <span>{{ browseLabel() }}</span>\r\n </button>\r\n }\r\n </div>\r\n } @else if (!(interactionLocked() && unreadable() > 0)) {\r\n <!--\r\n Empty: say what this field is for and exactly how to fill it, rather than\r\n leaving a bare \"nothing here\" the user has to interpret. The steps are\r\n suppressed when the field is read-only or unconfigured, because there is\r\n then no action for this user to take. Read-only with only unreadable links\r\n skips it: \"No transactions linked\" would contradict the notice below, which\r\n then stands alone as the field's one statement.\r\n -->\r\n <div class=\"doc-link__guide\" [class.doc-link__guide--muted]=\"interactionLocked()\">\r\n <p class=\"doc-link__guide-head\">\r\n <mat-icon class=\"doc-link__guide-icon\" aria-hidden=\"true\">link</mat-icon>\r\n <span class=\"doc-link__empty\">{{ emptyMessage() }}</span>\r\n </p>\r\n\r\n @if (showSteps()) {\r\n <ol class=\"doc-link__steps\">\r\n <li>\r\n Choose <strong>{{ browseLabel() }}</strong> below to open the transaction list.\r\n </li>\r\n <li>\r\n Search by reference or any listed column, and narrow the list by workflow step.\r\n </li>\r\n <li>\r\n @if (allowMultiple()) {\r\n Tick every transaction this form relates to, then choose <strong>Done</strong>.\r\n } @else {\r\n Select the transaction this form relates to, then choose <strong>Done</strong>.\r\n }\r\n </li>\r\n </ol>\r\n }\r\n\r\n @if (!interactionLocked()) {\r\n <button\r\n type=\"button\"\r\n class=\"doc-link__browse\"\r\n [disabled]=\"!canBrowse()\"\r\n (click)=\"openBrowser()\"\r\n >\r\n <mat-icon class=\"doc-link__browse-icon\" aria-hidden=\"true\">search</mat-icon>\r\n <span>{{ browseLabel() }}</span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @if (unreadable() > 0) {\r\n @if (interactionLocked()) {\r\n <!-- Read-only: nobody here can re-link, so state the fact and ask nothing. -->\r\n <p class=\"doc-link__notice doc-link__notice--neutral\" role=\"note\">\r\n <mat-icon class=\"doc-link__notice-icon\" aria-hidden=\"true\">link_off</mat-icon>\r\n <span>{{ unreadableMessage() }}</span>\r\n </p>\r\n } @else {\r\n <p class=\"doc-link__notice doc-link__notice--warn\" role=\"status\">\r\n <mat-icon class=\"doc-link__notice-icon\" aria-hidden=\"true\">report_problem</mat-icon>\r\n <span>\r\n <strong>{{ unreadableMessage() }}</strong> — they were saved in an older format.\r\n Re-link them here to fix this field.\r\n </span>\r\n </p>\r\n }\r\n }\r\n\r\n @if (unconfigured() && !interactionLocked()) {\r\n <p class=\"doc-link__notice doc-link__notice--warn\" role=\"status\">\r\n <mat-icon class=\"doc-link__notice-icon\" aria-hidden=\"true\">report_problem</mat-icon>\r\n <span>\r\n <strong>No workflow is configured for this field</strong> — nothing can be linked\r\n until an administrator opens this form in the Form Builder and chooses the\r\n workflow whose transactions this field should reference.\r\n </span>\r\n </p>\r\n }\r\n</div>\r\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type { FormBuilderFunctions, ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { DocumentPickerReactiveInputComponent } from './core/document-picker-reactive-input/document-picker-reactive-input.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Per-instance suffix for the read-only label id, so two pickers never share one. */\r\nlet nextReadOnlyLabelId = 0;\r\n\r\n/**\r\n * Wraps a document-picker control inside a `mat-form-field`, contributing the\r\n * label, hint, errors and prefix/suffix affordances. The control itself owns the\r\n * linked-transaction chips and the browse dialog.\r\n */\r\n@Component({\r\n selector: 'lib-document-picker',\r\n templateUrl: './document-picker.component.html',\r\n styleUrl: './document-picker.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n DocumentPickerReactiveInputComponent,\r\n TFormInputStatusComponent,\r\n ],\r\n})\r\nexport class DocumentPickerComponent {\r\n /** Builder configuration for the field being rendered. */\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n /** Form group holding the control this field writes to. */\r\n readonly formGroup = input.required<FormGroup>();\r\n\r\n /**\r\n * `true` while the field renders inside the form builder rather than a live form.\r\n * Declared because the element registry marks this renderer builder-aware and\r\n * forwards it; the picker's presentation does not currently differ.\r\n */\r\n readonly editorMode = input<boolean>(false);\r\n\r\n /**\r\n * Builder callbacks forwarded by the element registry to builder-aware\r\n * renderers. The picker no longer loads its own data — the browse dialog queries\r\n * through the document repository — so nothing here consumes them.\r\n */\r\n readonly formBuilderFunctions = input<FormBuilderFunctions | undefined>(undefined);\r\n\r\n /**\r\n * `true` when the field is a read-only view of its value (System Doc, review).\r\n * Read-only renders the linked records on the page surface instead of inside a\r\n * filled/outlined form field — a box around a value nobody can edit is noise.\r\n * Keyed on `readonly` only, so a field merely disabled in a live form keeps its\r\n * form-field frame exactly as before.\r\n */\r\n protected readonly readOnlyView = computed<boolean>(() => this.inputConfig()?.readonly === true);\r\n\r\n /**\r\n * Id of the visible read-only label; the group names itself from it\r\n * (`aria-labelledby`) so a screen reader announces the label once, not twice.\r\n */\r\n protected readonly readOnlyLabelId = `lib-document-picker-label-${nextReadOnlyLabelId++}`;\r\n\r\n /** First validation message to show under the field, if any. */\r\n protected readonly errorMessage = computed(() =>\r\n getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n}\r\n","<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n @if (readOnlyView()) {\r\n <!--\r\n Read-only: the linked records ARE the value, so they sit on the page's own\r\n surface — no fill well, no outline, no affordances. The label (when the\r\n host did not render its own) stays as plain text above the chips.\r\n -->\r\n <div class=\"doc-picker-readonly\" role=\"group\" [attr.aria-labelledby]=\"inputConfig.label ? readOnlyLabelId : null\">\r\n @if (inputConfig.label) {\r\n <span class=\"doc-picker-readonly__label\" [id]=\"readOnlyLabelId\">{{ inputConfig.label }}</span>\r\n }\r\n <lib-document-picker-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n ></lib-document-picker-reactive-input>\r\n </div>\r\n } @else {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-document-picker-reactive-input\r\n [disabled]=\"!!inputConfig.disabled\"\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n ></lib-document-picker-reactive-input>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon>sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.suffixIcon) {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span class=\"affix-text\" matPrefix>{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span class=\"affix-text affix-text--suffix\" matSuffix>{{ inputConfig.suffixText }}</span>\r\n }\r\n </mat-form-field>\r\n }\r\n }\r\n</form>\r\n"],"names":["i2","i1","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2CA;;;;;;;;;;;;;;;AAeG;MAEU,kBAAkB,CAAA;AACpB,IAAA,WAAW;AACX,IAAA,WAAW;AAEX,IAAA,WAAW;AACX,IAAA,OAAO;AACP,IAAA,SAAS;AACT,IAAA,KAAK;AACL,IAAA,OAAO;;AAGP,IAAA,QAAQ;AACR,IAAA,UAAU;;AAEV,IAAA,KAAK;AAEL,IAAA,QAAQ;AACR,IAAA,aAAa;AACb,IAAA,MAAM;AACN,IAAA,KAAK;AACL,IAAA,QAAQ;AACR,IAAA,WAAW;AACX,IAAA,WAAW;AACX,IAAA,QAAQ;AACR,IAAA,MAAM;;AAmCN,IAAA,QAAQ;AAoBjB,IAAA,WAAA,GAAA;AA9ES,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACzC,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAA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,YAAA,EAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAChB,oCAAoC,wHACpC,yBAAyB,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAGhB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAhBnC,SAAS;+BACE,qBAAqB,EAAA,eAAA,EAGd,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,OAAA,EAChC;wBACP,mBAAmB;wBACnB,kBAAkB;wBAClB,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,oCAAoC;wBACpC,yBAAyB;AAC1B,qBAAA,EAAA,QAAA,EAAA,ovFAAA,EAAA,MAAA,EAAA,CAAA,gpBAAA,CAAA,EAAA;;;;;"}
|
|
@@ -6,14 +6,14 @@ import * as i2 from '@angular/material/form-field';
|
|
|
6
6
|
import { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';
|
|
7
7
|
import * as i3 from '@angular/material/icon';
|
|
8
8
|
import { MatIconModule } from '@angular/material/icon';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i1$1 from '@angular/material/button';
|
|
10
10
|
import { MatButtonModule } from '@angular/material/button';
|
|
11
11
|
import * as i5 from '@angular/material/tooltip';
|
|
12
12
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
13
13
|
import { RichTextEditorType } from 'ngx-t-forms-types';
|
|
14
|
-
import { B as BaseCustomInput, _ as _isEqual,
|
|
14
|
+
import { B as BaseCustomInput, _ as _isEqual, a9 as getInputErrorMessage, aa as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-C1kZpYIM.mjs';
|
|
15
15
|
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
16
|
-
import { E as EditorFullScreenHost, a as EditorFullScreenToggleComponent, Q as QuillInputComponent } from './ngx-t-forms-quill-input.component-
|
|
16
|
+
import { E as EditorFullScreenHost, a as EditorFullScreenToggleComponent, Q as QuillInputComponent } from './ngx-t-forms-quill-input.component-x9CHGOJy.mjs';
|
|
17
17
|
|
|
18
18
|
// Third-party Editor.js tool packages ship without typings that line up with
|
|
19
19
|
// the host editor's `ToolConstructable`. We narrow at the registration boundary
|
|
@@ -388,7 +388,7 @@ class EditorInputElementComponent {
|
|
|
388
388
|
this.errorMessage = computed(() => getInputErrorMessage(this.inputConfig(), this.formGroup()), ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
389
389
|
}
|
|
390
390
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: EditorInputElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
391
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: EditorInputElementComponent, isStandalone: true, selector: "lib-editor-input-element", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { reload: "reload" }, ngImport: i0, template: "<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n @switch (inputConfig.richTextEditorLibrary) {\r\n @case (editorType.Quill) {\r\n <lib-quill-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-quill-input>\r\n }\r\n @case (editorType.EditorJS) {\r\n <lib-editor-js-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-editor-js-input>\r\n }\r\n }\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"
|
|
391
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: EditorInputElementComponent, isStandalone: true, selector: "lib-editor-input-element", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { reload: "reload" }, ngImport: i0, template: "<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n @switch (inputConfig.richTextEditorLibrary) {\r\n @case (editorType.Quill) {\r\n <lib-quill-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-quill-input>\r\n }\r\n @case (editorType.EditorJS) {\r\n <lib-editor-js-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-editor-js-input>\r\n }\r\n }\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"padding: 0 12px;\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding: 0 12px;\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n", styles: ["mat-form-field{width:100%!important}mat-form-field .input-sync-button{display:none}mat-form-field:hover .input-sync-button{display:inline-block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { 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: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: TFormInputStatusComponent, selector: "lib-t-form-input-status", inputs: ["inputConfig"] }, { kind: "component", type: EditorJsInputComponent, selector: "lib-editor-js-input", inputs: ["inputConfig", "value"], outputs: ["valueChanged"] }, { kind: "component", type: QuillInputComponent, selector: "lib-quill-input", inputs: ["inputConfig", "bindings", "value"], outputs: ["valueChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
392
392
|
}
|
|
393
393
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: EditorInputElementComponent, decorators: [{
|
|
394
394
|
type: Component,
|
|
@@ -401,8 +401,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
401
401
|
TFormInputStatusComponent,
|
|
402
402
|
EditorJsInputComponent,
|
|
403
403
|
QuillInputComponent,
|
|
404
|
-
], template: "<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n @switch (inputConfig.richTextEditorLibrary) {\r\n @case (editorType.Quill) {\r\n <lib-quill-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-quill-input>\r\n }\r\n @case (editorType.EditorJS) {\r\n <lib-editor-js-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-editor-js-input>\r\n }\r\n }\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"
|
|
404
|
+
], template: "<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n @switch (inputConfig.richTextEditorLibrary) {\r\n @case (editorType.Quill) {\r\n <lib-quill-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-quill-input>\r\n }\r\n @case (editorType.EditorJS) {\r\n <lib-editor-js-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-editor-js-input>\r\n }\r\n }\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"padding: 0 12px;\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding: 0 12px;\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n", styles: ["mat-form-field{width:100%!important}mat-form-field .input-sync-button{display:none}mat-form-field:hover .input-sync-button{display:inline-block}\n"] }]
|
|
405
405
|
}], propDecorators: { inputConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputConfig", required: true }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: true }] }], reload: [{ type: i0.Output, args: ["reload"] }] } });
|
|
406
406
|
|
|
407
407
|
export { EditorInputElementComponent };
|
|
408
|
-
//# sourceMappingURL=ngx-t-forms-editor-input-element.component-
|
|
408
|
+
//# sourceMappingURL=ngx-t-forms-editor-input-element.component-BvZPNjQX.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-editor-input-element.component-BqofP5-4.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/form-input-rich-text-editor/config.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/editor-js-input/editor-js-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/editor-js-input/editor-js-input.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/editor-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/editor-input-element.component.html"],"sourcesContent":["/// <reference path=\"../../../../../../../types/editorjs.d.ts\" />\r\nimport type { EditorConfig, LogLevels, OutputData, ToolConstructable } from \"@editorjs/editorjs\";\r\n// `@editorjs/editorjs` is CJS — runtime named imports fail under Node ESM (SSR / smoke harness).\r\n// `LogLevels` is a runtime enum with string values; use the string literal cast at the single use site below.\r\n//\r\n// Wave 2 / Trap 16: every Editor.js plugin package below is a browser-only UMD bundle that crashes\r\n// under bare Node SSR (`self`/`document` not defined at module-eval). They are now loaded via\r\n// dynamic `import()` inside `loadEditorConfig()`, which is only invoked from an SSR-gated\r\n// `ngAfterViewInit` (see `editor-js-input.component.ts`). Static top-level imports here are\r\n// type-only and emit zero runtime code.\r\n\r\nexport interface EditorJsPayload {\r\n holderId: string,\r\n imageFetchEndpoint:string,\r\n imageUploadEndpoint: string,\r\n readOnly:boolean,\r\n onChangeFn: () => void,\r\n data:OutputData|undefined\r\n}\r\n\r\n// Third-party Editor.js tool packages ship without typings that line up with\r\n// the host editor's `ToolConstructable`. We narrow at the registration boundary\r\n// via `unknown` rather than leaking `any` through this module.\r\nconst asToolConstructable = (tool: unknown): ToolConstructable =>\r\n tool as ToolConstructable;\r\n\r\n/**\r\n * Dynamically loads every Editor.js plugin bundle and returns a ready-to-use `EditorConfig`.\r\n *\r\n * Browser-only: callers MUST gate this behind `isPlatformBrowser(...)` because each plugin\r\n * package touches `self` / `document` at module-eval time and crashes under bare-Node SSR.\r\n */\r\nexport const loadEditorConfig = async (\r\n payload: EditorJsPayload\r\n): Promise<EditorConfig> => {\r\n const [\r\n { default: Header },\r\n { default: List },\r\n { default: Paragraph },\r\n { default: Quote },\r\n { default: Table },\r\n { default: ImageTool },\r\n { default: Delimiter },\r\n { default: CodeTool },\r\n { default: Embed },\r\n ] = await Promise.all([\r\n import('@editorjs/header'),\r\n import('@editorjs/list'),\r\n import('@editorjs/paragraph'),\r\n import('@editorjs/quote'),\r\n import('@editorjs/table'),\r\n import('@editorjs/image'),\r\n import('@editorjs/delimiter'),\r\n import('@editorjs/code'),\r\n import('@editorjs/embed'),\r\n ]);\r\n\r\n return ({\r\n holder: payload.holderId,\r\n autofocus: true,\r\n placeholder: 'Let\\'s write something amazing...',\r\n inlineToolbar: true,\r\n tools: {\r\n header: {\r\n class: asToolConstructable(Header),\r\n config: {\r\n levels: [1, 2, 3, 4, 5, 6],\r\n defaultLevel: 1,\r\n placeholder: 'Type your heading here...'\r\n },\r\n inlineToolbar: ['link', 'bold', 'italic', 'marker']\r\n },\r\n list: {\r\n class: asToolConstructable(List),\r\n inlineToolbar: true,\r\n config: {\r\n defaultStyle: 'unordered',\r\n placeholder: 'Enter a list item here...'\r\n }\r\n },\r\n paragraph: {\r\n class: asToolConstructable(Paragraph),\r\n inlineToolbar: true,\r\n config: {\r\n preserveBlank: true,\r\n placeholder: 'Type your paragraph here...'\r\n }\r\n },\r\n quote: {\r\n class: asToolConstructable(Quote),\r\n inlineToolbar: true,\r\n shortcut: 'CMD+SHIFT+Q',\r\n config: {\r\n quotePlaceholder: 'Enter a quote',\r\n captionPlaceholder: 'Quote\\'s author',\r\n alignmentEnabled: true\r\n }\r\n },\r\n delimiter: {\r\n class: asToolConstructable(Delimiter)\r\n },\r\n image: {\r\n class: asToolConstructable(ImageTool),\r\n config: {\r\n endpoints: {\r\n byFile: payload.imageUploadEndpoint,\r\n byUrl: payload.imageFetchEndpoint\r\n },\r\n uploader: {\r\n uploadByFile(file: File) {\r\n // Custom upload logic\r\n }\r\n }\r\n }\r\n },\r\n table: {\r\n class: asToolConstructable(Table),\r\n inlineToolbar: true,\r\n config: {\r\n rows: 2,\r\n cols: 3\r\n }\r\n },\r\n code: {\r\n class: asToolConstructable(CodeTool),\r\n config: {\r\n placeholder: 'Enter code here...'\r\n }\r\n },\r\n\r\n embed: {\r\n class: asToolConstructable(Embed),\r\n config: {\r\n services: {\r\n youtube: true,\r\n codesandbox: true,\r\n codepen: true\r\n }\r\n }\r\n },\r\n\r\n },\r\n defaultBlock: 'paragraph',\r\n hideToolbar: false,\r\n data: payload.data,\r\n readOnly:payload.readOnly,\r\n logLevel: 'ERROR' as LogLevels,\r\n minHeight: 300,\r\n onChange: (api, event) => {\r\n payload.onChangeFn()\r\n },\r\n onReady: () => {},\r\n sanitizer: {\r\n p: true,\r\n b: true,\r\n a: {\r\n href: true,\r\n target: '_blank',\r\n rel: 'nofollow'\r\n }\r\n },\r\n i18n: {\r\n messages: {\r\n ui: {\r\n blockTunes: {\r\n toggler: {\r\n 'Click to tune': 'Click to tune',\r\n 'or drag to move': 'or drag to move'\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n}\r\n\r\n\r\n","import {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnDestroy,\r\n PLATFORM_ID,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n viewChild\r\n} from '@angular/core';\r\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\r\nimport { NgControl } from '@angular/forms';\r\n\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\n// Wave 2 / Trap 16: `@editorjs/editorjs` is a browser-only UMD bundle that crashes under\r\n// bare-Node SSR at module-eval time. Type-only import at the top keeps the surface intact\r\n// with zero runtime emission; the runtime load happens inside the SSR-gated `ngAfterViewInit`.\r\nimport type EditorJSType from '@editorjs/editorjs';\r\nimport type { OutputData } from '@editorjs/editorjs';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\n\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\nimport { loadEditorConfig, EditorJsPayload } from '../form-input-rich-text-editor/config';\r\nimport { EditorFullScreenHost } from '../editor-full-screen';\r\nimport { EditorFullScreenToggleComponent } from '../editor-full-screen-toggle/editor-full-screen-toggle.component';\r\nimport { _isEqual } from '../../../../../../shared/functions/isEqual';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-editor-js-input',\r\n nextId: 0\r\n};\r\n\r\n/**\r\n * Rich-text input backed by the Editor.js block editor, wired into Angular\r\n * Material's form-field via {@link MatFormFieldControl}.\r\n *\r\n * The Editor.js bundle is browser-only, so it is dynamically imported and\r\n * instantiated inside `ngAfterViewInit` behind an `isPlatformBrowser` guard\r\n * to stay SSR-safe. The editor instance is destroyed on `ngOnDestroy`.\r\n *\r\n * @deprecated Scheduled for removal. Do not use in new code; migrate existing\r\n * usages to the supported rich-text input element. Retained only for backward\r\n * compatibility with forms that still reference `lib-editor-js-input`.\r\n *\r\n * @example\r\n * <lib-editor-js-input [inputConfig]=\"column()\" (valueChanged)=\"onChange($event)\" />\r\n */\r\n@Component({\r\n selector: 'lib-editor-js-input',\r\n templateUrl: './editor-js-input.component.html',\r\n styleUrl: './editor-js-input.component.css',\r\n imports: [EditorFullScreenToggleComponent],\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n '(keydown.escape)': 'onEscape($event)'\r\n },\r\n providers: [{ provide: MatFormFieldControl, useExisting: EditorJsInputComponent }],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class EditorJsInputComponent\r\n extends BaseCustomInput<OutputData | undefined>\r\n implements AfterViewInit, OnDestroy {\r\n\r\n /** Column definition describing the field's id, read-only state and metadata. */\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n /** Emits the editor's saved {@link OutputData} whenever its content changes. */\r\n readonly valueChanged = output<OutputData | undefined>();\r\n\r\n /** Live Editor.js instance; `undefined` until initialised (or on the server). */\r\n protected editor: EditorJSType | undefined;\r\n\r\n /** Whether the editor is currently popped out to fill the screen. */\r\n protected readonly fullScreen = signal(false);\r\n\r\n /**\r\n * Height the in-flow wrapper holds onto while the editor is popped out. Set from the editor's\r\n * measured height on the way in, cleared on the way out.\r\n */\r\n protected readonly reservedHeight = signal<number | null>(null);\r\n\r\n /**\r\n * The bordered surface carrying the editor — this is what gets promoted to the browser's top\r\n * layer. (`viewChild` cannot sit on an ES-private field — NG1053.)\r\n */\r\n private readonly editorContainer = viewChild.required<ElementRef<HTMLElement>>('editorContainer');\r\n\r\n readonly #platformId = inject(PLATFORM_ID);\r\n\r\n readonly #document = inject(DOCUMENT);\r\n\r\n #fullScreenHost: EditorFullScreenHost | undefined;\r\n\r\n /** Guards against overlapping pop-out transitions (see `#toggleFullScreen`). */\r\n #toggling = false;\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { optional: true, self: true }) as NgControl,\r\n inject<ElementRef<HTMLElement>>(ElementRef),\r\n customInputConfig\r\n );\r\n }\r\n\r\n override get empty(): boolean {\r\n const n = this.value;\r\n // Check for null, undefined, or empty string, but allow 0\r\n return n === null || n === undefined || (n as unknown) === '';\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return true;\r\n }\r\n\r\n override _value: OutputData | undefined = undefined;\r\n\r\n @Input() override set value(value: OutputData | undefined) {\r\n if (!_isEqual(this._value, value)) {\r\n this._value = value;\r\n this.onChange(value);\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n override get value(): OutputData | undefined {\r\n return this._value;\r\n }\r\n\r\n async ngAfterViewInit(): Promise<void> {\r\n if (!isPlatformBrowser(this.#platformId)) return;\r\n\r\n this.#destroyEditor();\r\n\r\n this.#fullScreenHost ??= new EditorFullScreenHost(this.#document, () => this.#setFullScreen(false));\r\n\r\n const payload: EditorJsPayload = {\r\n holderId: this.inputConfig().id,\r\n imageFetchEndpoint: '',\r\n imageUploadEndpoint: '',\r\n readOnly: this.inputConfig().readonly || this.inputConfig().disabled || false,\r\n data: this.value || undefined,\r\n onChangeFn: this.contentChangedSaveValue.bind(this)\r\n };\r\n\r\n // Browser-only dynamic load — see Trap 16 comment at the top of this file and in config.ts.\r\n const [{ default: EditorJS }, config] = await Promise.all([\r\n import('@editorjs/editorjs'),\r\n loadEditorConfig(payload),\r\n ]);\r\n this.editor = new EditorJS(config);\r\n // A `setDisabledState` that arrived before the editor existed is applied here.\r\n void this.#applyReadOnly();\r\n }\r\n\r\n /**\r\n * Keeps Editor.js's own read-only state in step with the control's. The pop-out re-enables\r\n * pointer events on the popped-out surface (Material kills them field-wide when the control is\r\n * disabled), so this is what actually keeps a disabled field uneditable — the CSS no longer\r\n * does it.\r\n */\r\n override setDisabledState(isDisabled: boolean): void {\r\n super.setDisabledState(isDisabled);\r\n void this.#applyReadOnly();\r\n }\r\n\r\n /** Read-only when either the column config or the reactive-form control says so. */\r\n async #applyReadOnly(): Promise<void> {\r\n const editor = this.editor;\r\n if (!editor) return;\r\n const config = this.inputConfig();\r\n const readOnly = this.disabled || config.readonly || config.disabled || false;\r\n try {\r\n await editor.isReady;\r\n if (editor.readOnly.isEnabled !== readOnly) await editor.readOnly.toggle(readOnly);\r\n } catch {\r\n // Editor.js rejects when the configured tool set has no read-only support. The field then\r\n // keeps the state it was constructed with rather than the whole editor failing to load.\r\n }\r\n }\r\n\r\n async contentChangedSaveValue(): Promise<void> {\r\n const value: OutputData | undefined = await this.editor?.save();\r\n this.value = value;\r\n this.onChange(value);\r\n this.valueChanged.emit(value);\r\n }\r\n\r\n /** Toggles the pop-out from the corner button. */\r\n protected toggleFullScreen(): void {\r\n void this.#toggleFullScreen();\r\n }\r\n\r\n /**\r\n * Escape leaves the pop-out. Native full screen is torn down by the browser itself (picked up\r\n * through `fullscreenchange`); this covers the popover and fixed fallbacks. The event is\r\n * stopped so Escape closes the editor rather than an enclosing dialog.\r\n */\r\n protected onEscape(event: Event): void {\r\n if (!this.fullScreen()) return;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n void this.#toggleFullScreen();\r\n }\r\n\r\n /**\r\n * Pops the editor out to fill the screen, or restores it. Runs inside the button's click\r\n * gesture, which the Fullscreen API requires — everything up to the promotion is synchronous\r\n * for that reason.\r\n *\r\n * Unlike the Quill sibling there is no caret to restore: the element is promoted in place, so\r\n * the native selection inside Editor.js's contenteditable blocks survives untouched.\r\n */\r\n async #toggleFullScreen(): Promise<void> {\r\n const fullScreenHost = this.#fullScreenHost;\r\n // Both transitions settle asynchronously; ignore clicks that land mid-flight rather than\r\n // letting a second `requestFullscreen()` race the first.\r\n if (!fullScreenHost || this.#toggling) return;\r\n this.#toggling = true;\r\n\r\n try {\r\n if (this.fullScreen()) {\r\n await fullScreenHost.exit();\r\n } else {\r\n const element = this.editorContainer().nativeElement;\r\n this.reservedHeight.set(element.offsetHeight);\r\n await fullScreenHost.enter(element);\r\n }\r\n } finally {\r\n // `enter()` degrades rather than throwing, but `exit()` can reject if the browser refuses\r\n // to leave full screen. Either way the controller has already settled its own state, so\r\n // read it back instead of assuming the toggle succeeded.\r\n this.#setFullScreen(fullScreenHost.active);\r\n this.#toggling = false;\r\n }\r\n }\r\n\r\n /**\r\n * Single funnel for pop-out state, so the signal and the reserved space always agree —\r\n * including when the browser closed full screen on its own.\r\n */\r\n #setFullScreen(active: boolean): void {\r\n this.fullScreen.set(active);\r\n if (!active) this.reservedHeight.set(null);\r\n }\r\n\r\n /**\r\n * Tears the live editor down, if there is one that can be torn down.\r\n *\r\n * Editor.js attaches its public API — `destroy` included — inside `exportAPI`, which runs\r\n * from `isReady.then(...)`. An editor whose initialisation FAILED (the classic case: the\r\n * holder element left the document before the dynamic `import()` settled, which is routine\r\n * when a dialog or step closes early) is therefore a live instance carrying nothing but a\r\n * rejected `isReady`. `this.editor?.destroy()` guards that the instance exists, not that it\r\n * initialised, so that case threw `destroy is not a function` straight out of `ngOnDestroy`.\r\n * Check the method, not just the instance.\r\n */\r\n #destroyEditor(): void {\r\n const editor = this.editor;\r\n this.editor = undefined;\r\n if (typeof editor?.destroy === 'function') editor.destroy();\r\n }\r\n\r\n override ngOnDestroy(): void {\r\n this.#fullScreenHost?.destroy();\r\n this.#fullScreenHost = undefined;\r\n this.#destroyEditor();\r\n // Tear the editor down first, then let the base complete `stateChanges` / `destroy$` and\r\n // clear the temporary-error timer — none of which happened while this override skipped it.\r\n super.ngOnDestroy();\r\n }\r\n}\r\n","\r\n<!-- `.editor-shell` stays in the document flow and holds the editor's footprint while\r\n `.editor-container` is promoted to the browser's top layer for full screen. Without it the\r\n surrounding form-field collapses by the editor's height, and the page scroll position jumps\r\n when full screen is left. -->\r\n<div class=\"editor-shell\" [style.height.px]=\"reservedHeight()\">\r\n <div class=\"editor-container\" #editorContainer>\r\n <div class=\"editor-holder\" #editorJs [id]=\"inputConfig().id\"></div>\r\n\r\n <!-- Floats over the content; Editor.js has no toolbar of its own to host it. -->\r\n <lib-editor-full-screen-toggle\r\n [active]=\"fullScreen()\"\r\n (toggled)=\"toggleFullScreen()\"\r\n ></lib-editor-full-screen-toggle>\r\n </div>\r\n</div>\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { RichTextEditorType } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { EditorJsInputComponent } from './core/editor-js-input/editor-js-input.component';\r\nimport { QuillInputComponent } from './core/quill-input/quill-input.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/**\r\n * Wraps a configurable rich-text editor inside a `mat-form-field`, selecting the concrete\r\n * editor (EditorJS or Quill) from the column's `richTextEditorLibrary`, with shared\r\n * label / hint / error / suffix / prefix metadata from the column.\r\n */\r\n@Component({\r\n selector: 'lib-editor-input-element',\r\n templateUrl: './editor-input-element.component.html',\r\n styleUrl: './editor-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n TFormInputStatusComponent,\r\n EditorJsInputComponent,\r\n QuillInputComponent,\r\n ],\r\n})\r\nexport class EditorInputElementComponent {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n readonly reload = output<void>();\r\n\r\n /** Editor-library enum exposed for `@switch` in the template. */\r\n protected readonly editorType = RichTextEditorType;\r\n\r\n protected readonly errorMessage = computed(() =>\r\n getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n}\r\n","<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n @switch (inputConfig.richTextEditorLibrary) {\r\n @case (editorType.Quill) {\r\n <lib-quill-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-quill-input>\r\n }\r\n @case (editorType.EditorJS) {\r\n <lib-editor-js-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-editor-js-input>\r\n }\r\n }\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;AACA,MAAM,mBAAmB,GAAG,CAAC,IAAa,KACtC,IAAyB;AAE7B;;;;;AAKG;AACI,MAAM,gBAAgB,GAAG,OAC5B,OAAwB,KACD;AACvB,IAAA,MAAM,CACF,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,EAAE,OAAO,EAAE,IAAI,EAAE,EACjB,EAAE,OAAO,EAAE,SAAS,EAAE,EACtB,EAAE,OAAO,EAAE,KAAK,EAAE,EAClB,EAAE,OAAO,EAAE,KAAK,EAAE,EAClB,EAAE,OAAO,EAAE,SAAS,EAAE,EACtB,EAAE,OAAO,EAAE,SAAS,EAAE,EACtB,EAAE,OAAO,EAAE,QAAQ,EAAE,EACrB,EAAE,OAAO,EAAE,KAAK,EAAE,EACrB,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAClB,OAAO,kBAAkB,CAAC;QAC1B,OAAO,gBAAgB,CAAC;QACxB,OAAO,qBAAqB,CAAC;QAC7B,OAAO,iBAAiB,CAAC;QACzB,OAAO,iBAAiB,CAAC;QACzB,OAAO,iBAAiB,CAAC;QACzB,OAAO,qBAAqB,CAAC;QAC7B,OAAO,gBAAgB,CAAC;QACxB,OAAO,iBAAiB,CAAC;AAC5B,KAAA,CAAC;AAEF,IAAA,QAAQ;QACJ,MAAM,EAAE,OAAO,CAAC,QAAQ;AACxB,QAAA,SAAS,EAAE,IAAI;AACf,QAAA,WAAW,EAAE,mCAAmC;AAChD,QAAA,aAAa,EAAE,IAAI;AACnB,QAAA,KAAK,EAAE;AACH,YAAA,MAAM,EAAE;AACJ,gBAAA,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC;AAClC,g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3,"file":"ngx-t-forms-editor-input-element.component-BvZPNjQX.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/form-input-rich-text-editor/config.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/editor-js-input/editor-js-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/editor-js-input/editor-js-input.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/editor-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/editor-input-element.component.html"],"sourcesContent":["/// <reference path=\"../../../../../../../types/editorjs.d.ts\" />\r\nimport type { EditorConfig, LogLevels, OutputData, ToolConstructable } from \"@editorjs/editorjs\";\r\n// `@editorjs/editorjs` is CJS — runtime named imports fail under Node ESM (SSR / smoke harness).\r\n// `LogLevels` is a runtime enum with string values; use the string literal cast at the single use site below.\r\n//\r\n// Wave 2 / Trap 16: every Editor.js plugin package below is a browser-only UMD bundle that crashes\r\n// under bare Node SSR (`self`/`document` not defined at module-eval). They are now loaded via\r\n// dynamic `import()` inside `loadEditorConfig()`, which is only invoked from an SSR-gated\r\n// `ngAfterViewInit` (see `editor-js-input.component.ts`). Static top-level imports here are\r\n// type-only and emit zero runtime code.\r\n\r\nexport interface EditorJsPayload {\r\n holderId: string,\r\n imageFetchEndpoint:string,\r\n imageUploadEndpoint: string,\r\n readOnly:boolean,\r\n onChangeFn: () => void,\r\n data:OutputData|undefined\r\n}\r\n\r\n// Third-party Editor.js tool packages ship without typings that line up with\r\n// the host editor's `ToolConstructable`. We narrow at the registration boundary\r\n// via `unknown` rather than leaking `any` through this module.\r\nconst asToolConstructable = (tool: unknown): ToolConstructable =>\r\n tool as ToolConstructable;\r\n\r\n/**\r\n * Dynamically loads every Editor.js plugin bundle and returns a ready-to-use `EditorConfig`.\r\n *\r\n * Browser-only: callers MUST gate this behind `isPlatformBrowser(...)` because each plugin\r\n * package touches `self` / `document` at module-eval time and crashes under bare-Node SSR.\r\n */\r\nexport const loadEditorConfig = async (\r\n payload: EditorJsPayload\r\n): Promise<EditorConfig> => {\r\n const [\r\n { default: Header },\r\n { default: List },\r\n { default: Paragraph },\r\n { default: Quote },\r\n { default: Table },\r\n { default: ImageTool },\r\n { default: Delimiter },\r\n { default: CodeTool },\r\n { default: Embed },\r\n ] = await Promise.all([\r\n import('@editorjs/header'),\r\n import('@editorjs/list'),\r\n import('@editorjs/paragraph'),\r\n import('@editorjs/quote'),\r\n import('@editorjs/table'),\r\n import('@editorjs/image'),\r\n import('@editorjs/delimiter'),\r\n import('@editorjs/code'),\r\n import('@editorjs/embed'),\r\n ]);\r\n\r\n return ({\r\n holder: payload.holderId,\r\n autofocus: true,\r\n placeholder: 'Let\\'s write something amazing...',\r\n inlineToolbar: true,\r\n tools: {\r\n header: {\r\n class: asToolConstructable(Header),\r\n config: {\r\n levels: [1, 2, 3, 4, 5, 6],\r\n defaultLevel: 1,\r\n placeholder: 'Type your heading here...'\r\n },\r\n inlineToolbar: ['link', 'bold', 'italic', 'marker']\r\n },\r\n list: {\r\n class: asToolConstructable(List),\r\n inlineToolbar: true,\r\n config: {\r\n defaultStyle: 'unordered',\r\n placeholder: 'Enter a list item here...'\r\n }\r\n },\r\n paragraph: {\r\n class: asToolConstructable(Paragraph),\r\n inlineToolbar: true,\r\n config: {\r\n preserveBlank: true,\r\n placeholder: 'Type your paragraph here...'\r\n }\r\n },\r\n quote: {\r\n class: asToolConstructable(Quote),\r\n inlineToolbar: true,\r\n shortcut: 'CMD+SHIFT+Q',\r\n config: {\r\n quotePlaceholder: 'Enter a quote',\r\n captionPlaceholder: 'Quote\\'s author',\r\n alignmentEnabled: true\r\n }\r\n },\r\n delimiter: {\r\n class: asToolConstructable(Delimiter)\r\n },\r\n image: {\r\n class: asToolConstructable(ImageTool),\r\n config: {\r\n endpoints: {\r\n byFile: payload.imageUploadEndpoint,\r\n byUrl: payload.imageFetchEndpoint\r\n },\r\n uploader: {\r\n uploadByFile(file: File) {\r\n // Custom upload logic\r\n }\r\n }\r\n }\r\n },\r\n table: {\r\n class: asToolConstructable(Table),\r\n inlineToolbar: true,\r\n config: {\r\n rows: 2,\r\n cols: 3\r\n }\r\n },\r\n code: {\r\n class: asToolConstructable(CodeTool),\r\n config: {\r\n placeholder: 'Enter code here...'\r\n }\r\n },\r\n\r\n embed: {\r\n class: asToolConstructable(Embed),\r\n config: {\r\n services: {\r\n youtube: true,\r\n codesandbox: true,\r\n codepen: true\r\n }\r\n }\r\n },\r\n\r\n },\r\n defaultBlock: 'paragraph',\r\n hideToolbar: false,\r\n data: payload.data,\r\n readOnly:payload.readOnly,\r\n logLevel: 'ERROR' as LogLevels,\r\n minHeight: 300,\r\n onChange: (api, event) => {\r\n payload.onChangeFn()\r\n },\r\n onReady: () => {},\r\n sanitizer: {\r\n p: true,\r\n b: true,\r\n a: {\r\n href: true,\r\n target: '_blank',\r\n rel: 'nofollow'\r\n }\r\n },\r\n i18n: {\r\n messages: {\r\n ui: {\r\n blockTunes: {\r\n toggler: {\r\n 'Click to tune': 'Click to tune',\r\n 'or drag to move': 'or drag to move'\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n}\r\n\r\n\r\n","import {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnDestroy,\r\n PLATFORM_ID,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n viewChild\r\n} from '@angular/core';\r\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\r\nimport { NgControl } from '@angular/forms';\r\n\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\n// Wave 2 / Trap 16: `@editorjs/editorjs` is a browser-only UMD bundle that crashes under\r\n// bare-Node SSR at module-eval time. Type-only import at the top keeps the surface intact\r\n// with zero runtime emission; the runtime load happens inside the SSR-gated `ngAfterViewInit`.\r\nimport type EditorJSType from '@editorjs/editorjs';\r\nimport type { OutputData } from '@editorjs/editorjs';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\n\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\nimport { loadEditorConfig, EditorJsPayload } from '../form-input-rich-text-editor/config';\r\nimport { EditorFullScreenHost } from '../editor-full-screen';\r\nimport { EditorFullScreenToggleComponent } from '../editor-full-screen-toggle/editor-full-screen-toggle.component';\r\nimport { _isEqual } from '../../../../../../shared/functions/isEqual';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-editor-js-input',\r\n nextId: 0\r\n};\r\n\r\n/**\r\n * Rich-text input backed by the Editor.js block editor, wired into Angular\r\n * Material's form-field via {@link MatFormFieldControl}.\r\n *\r\n * The Editor.js bundle is browser-only, so it is dynamically imported and\r\n * instantiated inside `ngAfterViewInit` behind an `isPlatformBrowser` guard\r\n * to stay SSR-safe. The editor instance is destroyed on `ngOnDestroy`.\r\n *\r\n * @deprecated Scheduled for removal. Do not use in new code; migrate existing\r\n * usages to the supported rich-text input element. Retained only for backward\r\n * compatibility with forms that still reference `lib-editor-js-input`.\r\n *\r\n * @example\r\n * <lib-editor-js-input [inputConfig]=\"column()\" (valueChanged)=\"onChange($event)\" />\r\n */\r\n@Component({\r\n selector: 'lib-editor-js-input',\r\n templateUrl: './editor-js-input.component.html',\r\n styleUrl: './editor-js-input.component.css',\r\n imports: [EditorFullScreenToggleComponent],\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n '(keydown.escape)': 'onEscape($event)'\r\n },\r\n providers: [{ provide: MatFormFieldControl, useExisting: EditorJsInputComponent }],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class EditorJsInputComponent\r\n extends BaseCustomInput<OutputData | undefined>\r\n implements AfterViewInit, OnDestroy {\r\n\r\n /** Column definition describing the field's id, read-only state and metadata. */\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n /** Emits the editor's saved {@link OutputData} whenever its content changes. */\r\n readonly valueChanged = output<OutputData | undefined>();\r\n\r\n /** Live Editor.js instance; `undefined` until initialised (or on the server). */\r\n protected editor: EditorJSType | undefined;\r\n\r\n /** Whether the editor is currently popped out to fill the screen. */\r\n protected readonly fullScreen = signal(false);\r\n\r\n /**\r\n * Height the in-flow wrapper holds onto while the editor is popped out. Set from the editor's\r\n * measured height on the way in, cleared on the way out.\r\n */\r\n protected readonly reservedHeight = signal<number | null>(null);\r\n\r\n /**\r\n * The bordered surface carrying the editor — this is what gets promoted to the browser's top\r\n * layer. (`viewChild` cannot sit on an ES-private field — NG1053.)\r\n */\r\n private readonly editorContainer = viewChild.required<ElementRef<HTMLElement>>('editorContainer');\r\n\r\n readonly #platformId = inject(PLATFORM_ID);\r\n\r\n readonly #document = inject(DOCUMENT);\r\n\r\n #fullScreenHost: EditorFullScreenHost | undefined;\r\n\r\n /** Guards against overlapping pop-out transitions (see `#toggleFullScreen`). */\r\n #toggling = false;\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { optional: true, self: true }) as NgControl,\r\n inject<ElementRef<HTMLElement>>(ElementRef),\r\n customInputConfig\r\n );\r\n }\r\n\r\n override get empty(): boolean {\r\n const n = this.value;\r\n // Check for null, undefined, or empty string, but allow 0\r\n return n === null || n === undefined || (n as unknown) === '';\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return true;\r\n }\r\n\r\n override _value: OutputData | undefined = undefined;\r\n\r\n @Input() override set value(value: OutputData | undefined) {\r\n if (!_isEqual(this._value, value)) {\r\n this._value = value;\r\n this.onChange(value);\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n override get value(): OutputData | undefined {\r\n return this._value;\r\n }\r\n\r\n async ngAfterViewInit(): Promise<void> {\r\n if (!isPlatformBrowser(this.#platformId)) return;\r\n\r\n this.#destroyEditor();\r\n\r\n this.#fullScreenHost ??= new EditorFullScreenHost(this.#document, () => this.#setFullScreen(false));\r\n\r\n const payload: EditorJsPayload = {\r\n holderId: this.inputConfig().id,\r\n imageFetchEndpoint: '',\r\n imageUploadEndpoint: '',\r\n readOnly: this.inputConfig().readonly || this.inputConfig().disabled || false,\r\n data: this.value || undefined,\r\n onChangeFn: this.contentChangedSaveValue.bind(this)\r\n };\r\n\r\n // Browser-only dynamic load — see Trap 16 comment at the top of this file and in config.ts.\r\n const [{ default: EditorJS }, config] = await Promise.all([\r\n import('@editorjs/editorjs'),\r\n loadEditorConfig(payload),\r\n ]);\r\n this.editor = new EditorJS(config);\r\n // A `setDisabledState` that arrived before the editor existed is applied here.\r\n void this.#applyReadOnly();\r\n }\r\n\r\n /**\r\n * Keeps Editor.js's own read-only state in step with the control's. The pop-out re-enables\r\n * pointer events on the popped-out surface (Material kills them field-wide when the control is\r\n * disabled), so this is what actually keeps a disabled field uneditable — the CSS no longer\r\n * does it.\r\n */\r\n override setDisabledState(isDisabled: boolean): void {\r\n super.setDisabledState(isDisabled);\r\n void this.#applyReadOnly();\r\n }\r\n\r\n /** Read-only when either the column config or the reactive-form control says so. */\r\n async #applyReadOnly(): Promise<void> {\r\n const editor = this.editor;\r\n if (!editor) return;\r\n const config = this.inputConfig();\r\n const readOnly = this.disabled || config.readonly || config.disabled || false;\r\n try {\r\n await editor.isReady;\r\n if (editor.readOnly.isEnabled !== readOnly) await editor.readOnly.toggle(readOnly);\r\n } catch {\r\n // Editor.js rejects when the configured tool set has no read-only support. The field then\r\n // keeps the state it was constructed with rather than the whole editor failing to load.\r\n }\r\n }\r\n\r\n async contentChangedSaveValue(): Promise<void> {\r\n const value: OutputData | undefined = await this.editor?.save();\r\n this.value = value;\r\n this.onChange(value);\r\n this.valueChanged.emit(value);\r\n }\r\n\r\n /** Toggles the pop-out from the corner button. */\r\n protected toggleFullScreen(): void {\r\n void this.#toggleFullScreen();\r\n }\r\n\r\n /**\r\n * Escape leaves the pop-out. Native full screen is torn down by the browser itself (picked up\r\n * through `fullscreenchange`); this covers the popover and fixed fallbacks. The event is\r\n * stopped so Escape closes the editor rather than an enclosing dialog.\r\n */\r\n protected onEscape(event: Event): void {\r\n if (!this.fullScreen()) return;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n void this.#toggleFullScreen();\r\n }\r\n\r\n /**\r\n * Pops the editor out to fill the screen, or restores it. Runs inside the button's click\r\n * gesture, which the Fullscreen API requires — everything up to the promotion is synchronous\r\n * for that reason.\r\n *\r\n * Unlike the Quill sibling there is no caret to restore: the element is promoted in place, so\r\n * the native selection inside Editor.js's contenteditable blocks survives untouched.\r\n */\r\n async #toggleFullScreen(): Promise<void> {\r\n const fullScreenHost = this.#fullScreenHost;\r\n // Both transitions settle asynchronously; ignore clicks that land mid-flight rather than\r\n // letting a second `requestFullscreen()` race the first.\r\n if (!fullScreenHost || this.#toggling) return;\r\n this.#toggling = true;\r\n\r\n try {\r\n if (this.fullScreen()) {\r\n await fullScreenHost.exit();\r\n } else {\r\n const element = this.editorContainer().nativeElement;\r\n this.reservedHeight.set(element.offsetHeight);\r\n await fullScreenHost.enter(element);\r\n }\r\n } finally {\r\n // `enter()` degrades rather than throwing, but `exit()` can reject if the browser refuses\r\n // to leave full screen. Either way the controller has already settled its own state, so\r\n // read it back instead of assuming the toggle succeeded.\r\n this.#setFullScreen(fullScreenHost.active);\r\n this.#toggling = false;\r\n }\r\n }\r\n\r\n /**\r\n * Single funnel for pop-out state, so the signal and the reserved space always agree —\r\n * including when the browser closed full screen on its own.\r\n */\r\n #setFullScreen(active: boolean): void {\r\n this.fullScreen.set(active);\r\n if (!active) this.reservedHeight.set(null);\r\n }\r\n\r\n /**\r\n * Tears the live editor down, if there is one that can be torn down.\r\n *\r\n * Editor.js attaches its public API — `destroy` included — inside `exportAPI`, which runs\r\n * from `isReady.then(...)`. An editor whose initialisation FAILED (the classic case: the\r\n * holder element left the document before the dynamic `import()` settled, which is routine\r\n * when a dialog or step closes early) is therefore a live instance carrying nothing but a\r\n * rejected `isReady`. `this.editor?.destroy()` guards that the instance exists, not that it\r\n * initialised, so that case threw `destroy is not a function` straight out of `ngOnDestroy`.\r\n * Check the method, not just the instance.\r\n */\r\n #destroyEditor(): void {\r\n const editor = this.editor;\r\n this.editor = undefined;\r\n if (typeof editor?.destroy === 'function') editor.destroy();\r\n }\r\n\r\n override ngOnDestroy(): void {\r\n this.#fullScreenHost?.destroy();\r\n this.#fullScreenHost = undefined;\r\n this.#destroyEditor();\r\n // Tear the editor down first, then let the base complete `stateChanges` / `destroy$` and\r\n // clear the temporary-error timer — none of which happened while this override skipped it.\r\n super.ngOnDestroy();\r\n }\r\n}\r\n","\r\n<!-- `.editor-shell` stays in the document flow and holds the editor's footprint while\r\n `.editor-container` is promoted to the browser's top layer for full screen. Without it the\r\n surrounding form-field collapses by the editor's height, and the page scroll position jumps\r\n when full screen is left. -->\r\n<div class=\"editor-shell\" [style.height.px]=\"reservedHeight()\">\r\n <div class=\"editor-container\" #editorContainer>\r\n <div class=\"editor-holder\" #editorJs [id]=\"inputConfig().id\"></div>\r\n\r\n <!-- Floats over the content; Editor.js has no toolbar of its own to host it. -->\r\n <lib-editor-full-screen-toggle\r\n [active]=\"fullScreen()\"\r\n (toggled)=\"toggleFullScreen()\"\r\n ></lib-editor-full-screen-toggle>\r\n </div>\r\n</div>\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { RichTextEditorType } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { EditorJsInputComponent } from './core/editor-js-input/editor-js-input.component';\r\nimport { QuillInputComponent } from './core/quill-input/quill-input.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/**\r\n * Wraps a configurable rich-text editor inside a `mat-form-field`, selecting the concrete\r\n * editor (EditorJS or Quill) from the column's `richTextEditorLibrary`, with shared\r\n * label / hint / error / suffix / prefix metadata from the column.\r\n */\r\n@Component({\r\n selector: 'lib-editor-input-element',\r\n templateUrl: './editor-input-element.component.html',\r\n styleUrl: './editor-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n TFormInputStatusComponent,\r\n EditorJsInputComponent,\r\n QuillInputComponent,\r\n ],\r\n})\r\nexport class EditorInputElementComponent {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n readonly reload = output<void>();\r\n\r\n /** Editor-library enum exposed for `@switch` in the template. */\r\n protected readonly editorType = RichTextEditorType;\r\n\r\n protected readonly errorMessage = computed(() =>\r\n getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n}\r\n","<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n @switch (inputConfig.richTextEditorLibrary) {\r\n @case (editorType.Quill) {\r\n <lib-quill-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-quill-input>\r\n }\r\n @case (editorType.EditorJS) {\r\n <lib-editor-js-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-editor-js-input>\r\n }\r\n }\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"padding: 0 12px;\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding: 0 12px;\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;AACA,MAAM,mBAAmB,GAAG,CAAC,IAAa,KACtC,IAAyB;AAE7B;;;;;AAKG;AACI,MAAM,gBAAgB,GAAG,OAC5B,OAAwB,KACD;AACvB,IAAA,MAAM,CACF,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,EAAE,OAAO,EAAE,IAAI,EAAE,EACjB,EAAE,OAAO,EAAE,SAAS,EAAE,E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