ngx-t-forms 3.1.8 → 3.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{ngx-t-forms-api-endpoint-config.component-B4a-L4Eq.mjs → ngx-t-forms-api-endpoint-config.component-BbS1dY0l.mjs} +10 -10
- package/fesm2022/ngx-t-forms-api-endpoint-config.component-BbS1dY0l.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DqRunUz4.mjs → ngx-t-forms-auto-complete-input-element.component-B8eluIrh.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DqRunUz4.mjs.map → ngx-t-forms-auto-complete-input-element.component-B8eluIrh.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-autofillToken-D-BYfzxR.mjs +189 -0
- package/fesm2022/ngx-t-forms-autofillToken-D-BYfzxR.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-t8bTUgZ1.mjs → ngx-t-forms-basic-input-input-element.component-SSLXyCz9.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-t8bTUgZ1.mjs.map → ngx-t-forms-basic-input-input-element.component-SSLXyCz9.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-PcjMdAKu.mjs → ngx-t-forms-calculated-field-rules.component-Cn_rxXMX.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-PcjMdAKu.mjs.map → ngx-t-forms-calculated-field-rules.component-Cn_rxXMX.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-Ca4rim_J.mjs → ngx-t-forms-chip-options-creator-editor.component-CGm5tgsp.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-Ca4rim_J.mjs.map → ngx-t-forms-chip-options-creator-editor.component-CGm5tgsp.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-clamp-probe.directive-DMUdeVrM.mjs +99 -0
- package/fesm2022/ngx-t-forms-clamp-probe.directive-DMUdeVrM.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-conditional-display-config.component-Di7p76_n.mjs → ngx-t-forms-conditional-display-config.component-DIMIWTKj.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-conditional-display-config.component-Di7p76_n.mjs.map → ngx-t-forms-conditional-display-config.component-DIMIWTKj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CXMmDwKS.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-DKb3E9gA.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CXMmDwKS.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-DKb3E9gA.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-data-source-picker.component-DioXvLi3.mjs → ngx-t-forms-data-source-picker.component-BG_sr5VH.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-data-source-picker.component-DioXvLi3.mjs.map → ngx-t-forms-data-source-picker.component-BG_sr5VH.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-h0S6qZDT.mjs → ngx-t-forms-date-picker-input-element.component-vUlUuzJ0.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-h0S6qZDT.mjs.map → ngx-t-forms-date-picker-input-element.component-vUlUuzJ0.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-8c1ErbgP.mjs → ngx-t-forms-date-range-picker-input-element.component-YVE_s-7Y.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-8c1ErbgP.mjs.map → ngx-t-forms-date-range-picker-input-element.component-YVE_s-7Y.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-time-picker-input-element.component-BgjGlXeq.mjs → ngx-t-forms-date-time-picker-input-element.component-BlOS8NdF.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-date-time-picker-input-element.component-BgjGlXeq.mjs.map → ngx-t-forms-date-time-picker-input-element.component-BlOS8NdF.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-u2UUPdAo.mjs +623 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-u2UUPdAo.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-document-picker.component-DYpsBHxT.mjs → ngx-t-forms-document-picker.component-DOYyRgh4.mjs} +41 -11
- package/fesm2022/{ngx-t-forms-document-picker.component-DYpsBHxT.mjs.map → ngx-t-forms-document-picker.component-DOYyRgh4.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-editor-input-element.component-CzNSb79n.mjs → ngx-t-forms-editor-input-element.component-BvZPNjQX.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-editor-input-element.component-CzNSb79n.mjs.map → ngx-t-forms-editor-input-element.component-BvZPNjQX.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-FPxHxAwF.mjs → ngx-t-forms-file-upload-input-element.component-CONELqoi.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-FPxHxAwF.mjs.map → ngx-t-forms-file-upload-input-element.component-CONELqoi.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-copy-lint.component-TCSe-27-.mjs +248 -0
- package/fesm2022/ngx-t-forms-form-copy-lint.component-TCSe-27-.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-form-input-selector.component-B3ES53R-.mjs → ngx-t-forms-form-input-selector.component-Bdkuzw0R.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-input-selector.component-B3ES53R-.mjs.map → ngx-t-forms-form-input-selector.component-Bdkuzw0R.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-Cu_ZEw1V.mjs → ngx-t-forms-form-json-view.component-CDcbgWgN.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-Cu_ZEw1V.mjs.map → ngx-t-forms-form-json-view.component-CDcbgWgN.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-DmTGnRgi.mjs → ngx-t-forms-form-section-stepper.component-CqLSI8zP.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-DmTGnRgi.mjs.map → ngx-t-forms-form-section-stepper.component-CqLSI8zP.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-6m2BM9e9.mjs → ngx-t-forms-forms-builder-menu.component-DFCVe_Fq.mjs} +185 -15
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-DFCVe_Fq.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-forms-native-date-adapter-CCJT5ep1.mjs → ngx-t-forms-forms-native-date-adapter-h6fClNMS.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-forms-native-date-adapter-CCJT5ep1.mjs.map → ngx-t-forms-forms-native-date-adapter-h6fClNMS.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-geo-location.component-DgXSaH0t.mjs → ngx-t-forms-geo-location.component-DA3ATrvw.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-geo-location.component-DgXSaH0t.mjs.map → ngx-t-forms-geo-location.component-DA3ATrvw.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-header-template-editor.component-NJLm6jkA.mjs → ngx-t-forms-header-template-editor.component-B9Cj8dOI.mjs} +13 -5
- package/fesm2022/ngx-t-forms-header-template-editor.component-B9Cj8dOI.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-iqPS9cPK.mjs → ngx-t-forms-image-capture-input-element.component-C9oz_ZjA.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-iqPS9cPK.mjs.map → ngx-t-forms-image-capture-input-element.component-C9oz_ZjA.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-index-CSXX8RTm.mjs +2 -0
- package/fesm2022/ngx-t-forms-index-CSXX8RTm.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-custom.component-BOy_3JqU.mjs → ngx-t-forms-input-custom.component-CqIr5wpy.mjs} +91 -25
- package/fesm2022/ngx-t-forms-input-custom.component-CqIr5wpy.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-editor.component-IUrZNmA5.mjs → ngx-t-forms-input-editor.component-DU2sgo4i.mjs} +9 -9
- package/fesm2022/{ngx-t-forms-input-editor.component-IUrZNmA5.mjs.map → ngx-t-forms-input-editor.component-DU2sgo4i.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-CtTAw9jk.mjs → ngx-t-forms-map-mat-options-keys-WfFq_0tS.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-CtTAw9jk.mjs.map → ngx-t-forms-map-mat-options-keys-WfFq_0tS.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C9bxVpQ1.mjs → ngx-t-forms-mat-chip-list-editor.component-CKnvqeix.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C9bxVpQ1.mjs.map → ngx-t-forms-mat-chip-list-editor.component-CKnvqeix.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BpiCchqY.mjs → ngx-t-forms-missing-form-configs.component-B5dDbmpj.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BpiCchqY.mjs.map → ngx-t-forms-missing-form-configs.component-B5dDbmpj.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-97tHCSyK.mjs +37 -0
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-97tHCSyK.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mscoa-config.component-soUwIbVA.mjs → ngx-t-forms-mscoa-config.component-BtLd7F2n.mjs} +10 -10
- package/fesm2022/{ngx-t-forms-mscoa-config.component-soUwIbVA.mjs.map → ngx-t-forms-mscoa-config.component-BtLd7F2n.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs → ngx-t-forms-mscoa-error-display.component-Bmt1vboD.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs.map → ngx-t-forms-mscoa-error-display.component-Bmt1vboD.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component--3DvQm1K.mjs → ngx-t-forms-mscoa-segment-config.component-DrzpixbK.mjs} +9 -9
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component--3DvQm1K.mjs.map → ngx-t-forms-mscoa-segment-config.component-DrzpixbK.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs → ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs.map → ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-ddpips7E.mjs +3592 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-ddpips7E.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-CaVyRedJ.mjs → ngx-t-forms-ngx-t-forms-C1kZpYIM.mjs} +9303 -2202
- package/fesm2022/ngx-t-forms-ngx-t-forms-C1kZpYIM.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-paginated-selection-table-B7TyhJnh.mjs +596 -0
- package/fesm2022/ngx-t-forms-paginated-selection-table-B7TyhJnh.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-payload-template-editor.component-CVj-G4MC.mjs → ngx-t-forms-payload-template-editor.component-DVL4aBuG.mjs} +13 -5
- package/fesm2022/ngx-t-forms-payload-template-editor.component-DVL4aBuG.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-BMyZKOXv.mjs → ngx-t-forms-pipeline-generator.component-DpqipW6G.mjs} +15 -15
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-BMyZKOXv.mjs.map → ngx-t-forms-pipeline-generator.component-DpqipW6G.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-quill-input.component-oUnmMDGi.mjs → ngx-t-forms-quill-input.component-x9CHGOJy.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-quill-input.component-oUnmMDGi.mjs.map → ngx-t-forms-quill-input.component-x9CHGOJy.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-record-list-manager.component-CdQU6loA.mjs → ngx-t-forms-record-list-manager.component-BGg86NER.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-record-list-manager.component-CdQU6loA.mjs.map → ngx-t-forms-record-list-manager.component-BGg86NER.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-CI9nLVXe.mjs +281 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-CI9nLVXe.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-B5w1Lvfo.mjs → ngx-t-forms-rest-api-call-setup.component-B4LzPwxg.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-B5w1Lvfo.mjs.map → ngx-t-forms-rest-api-call-setup.component-B4LzPwxg.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-section-report.component-CocLNrN5.mjs → ngx-t-forms-section-report.component-BS2CV_xl.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-section-report.component-CocLNrN5.mjs.map → ngx-t-forms-section-report.component-BS2CV_xl.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-select-input-element.component-C5qjqCXW.mjs +281 -0
- package/fesm2022/ngx-t-forms-select-input-element.component-C5qjqCXW.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-CBdC0WCz.mjs → ngx-t-forms-selection-options-editor.component-B6sYvtcj.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-CBdC0WCz.mjs.map → ngx-t-forms-selection-options-editor.component-B6sYvtcj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs → ngx-t-forms-t-workflow-picker.component-xDbl63v1.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs.map → ngx-t-forms-t-workflow-picker.component-xDbl63v1.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-GXiLEsTp.mjs → ngx-t-forms-textarea-input-element.component-ri0r0ujE.mjs} +77 -11
- package/fesm2022/ngx-t-forms-textarea-input-element.component-ri0r0ujE.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-toggle-input-element.component-CXUqCipx.mjs +124 -0
- package/fesm2022/ngx-t-forms-toggle-input-element.component-CXUqCipx.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-token-text-input.component-BMzPBtY_.mjs → ngx-t-forms-token-text-input.component-BWmoGQfi.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-token-text-input.component-BMzPBtY_.mjs.map → ngx-t-forms-token-text-input.component-BWmoGQfi.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-DWDBsV6a.mjs → ngx-t-forms-validators-config.component-DEm9M5s9.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-validators-config.component-DWDBsV6a.mjs.map → ngx-t-forms-validators-config.component-DEm9M5s9.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-DxObFakZ.mjs → ngx-t-forms-workflow-adjudication.component-BOC9Z40E.mjs} +28 -26
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-BOC9Z40E.mjs.map +1 -0
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/package.json +2 -2
- package/types/ngx-t-forms.d.ts +2370 -38
- package/fesm2022/ngx-t-forms-api-endpoint-config.component-B4a-L4Eq.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-BhVM8PFR.mjs +0 -373
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-BhVM8PFR.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-6m2BM9e9.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-header-template-editor.component-NJLm6jkA.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-index-zLon09cE.mjs +0 -2
- package/fesm2022/ngx-t-forms-index-zLon09cE.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-custom.component-BOy_3JqU.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-CjUf0zTA.mjs +0 -38
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-CjUf0zTA.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BZxpJRxJ.mjs +0 -2472
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BZxpJRxJ.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-CaVyRedJ.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-paginated-selection-table-DzZE-Zde.mjs +0 -557
- package/fesm2022/ngx-t-forms-paginated-selection-table-DzZE-Zde.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-payload-template-editor.component-CVj-G4MC.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-BtfEsmva.mjs +0 -271
- package/fesm2022/ngx-t-forms-required-inputs.component-BtfEsmva.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-select-input-element.component-B03O4cAK.mjs +0 -160
- package/fesm2022/ngx-t-forms-select-input-element.component-B03O4cAK.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-textarea-input-element.component-GXiLEsTp.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-toggle-input-element.component-WErP0SsA.mjs +0 -93
- package/fesm2022/ngx-t-forms-toggle-input-element.component-WErP0SsA.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-DxObFakZ.mjs.map +0 -1
|
@@ -3,7 +3,7 @@ import { signal, input, output, inject, ElementRef, computed, Input, ViewEncapsu
|
|
|
3
3
|
import { NgControl } from '@angular/forms';
|
|
4
4
|
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
6
|
-
import * as
|
|
6
|
+
import * as i1 from '@angular/material/button';
|
|
7
7
|
import { MatButtonModule } from '@angular/material/button';
|
|
8
8
|
import * as i3 from '@angular/material/card';
|
|
9
9
|
import { MatCardModule } from '@angular/material/card';
|
|
@@ -14,11 +14,11 @@ import { MatListModule } from '@angular/material/list';
|
|
|
14
14
|
import * as i5 from '@angular/material/tooltip';
|
|
15
15
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
16
|
import { DataSources } from 'ngx-t-forms-types';
|
|
17
|
-
import { E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-
|
|
18
|
-
import { MatChipListEditorComponent } from './ngx-t-forms-mat-chip-list-editor.component-
|
|
19
|
-
import { PipelineGeneratorComponent } from './ngx-t-forms-pipeline-generator.component-
|
|
20
|
-
import { RequiredInputsComponent } from './ngx-t-forms-required-inputs.component-
|
|
21
|
-
import { R as RestApiCallSetupComponent } from './ngx-t-forms-rest-api-call-setup.component-
|
|
17
|
+
import { E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-C1kZpYIM.mjs';
|
|
18
|
+
import { MatChipListEditorComponent } from './ngx-t-forms-mat-chip-list-editor.component-CKnvqeix.mjs';
|
|
19
|
+
import { PipelineGeneratorComponent } from './ngx-t-forms-pipeline-generator.component-DpqipW6G.mjs';
|
|
20
|
+
import { RequiredInputsComponent } from './ngx-t-forms-required-inputs.component-CI9nLVXe.mjs';
|
|
21
|
+
import { R as RestApiCallSetupComponent } from './ngx-t-forms-rest-api-call-setup.component-B4LzPwxg.mjs';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Internal editor element for configuring a report's data sources (API calls and
|
|
@@ -226,7 +226,7 @@ class DataSourcePickerComponent {
|
|
|
226
226
|
return config?.source === DataSources.Api;
|
|
227
227
|
}
|
|
228
228
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DataSourcePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
229
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DataSourcePickerComponent, isStandalone: true, selector: "lib-data-source-picker", inputs: { errors: { classPropertyName: "errors", publicName: "errors", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, editorConfig: { classPropertyName: "editorConfig", publicName: "editorConfig", isSignal: false, isRequired: false, transformFunction: null }, formInputs: { classPropertyName: "formInputs", publicName: "formInputs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.id": "id", "class.lib-data-source-picker--focused": "focused", "class.lib-data-source-picker--disabled": "disabled" }, classAttribute: "lib-data-source-picker" }, providers: [{ provide: MatFormFieldControl, useExisting: DataSourcePickerComponent }], ngImport: i0, template: "<div class=\"lib-data-source-picker__list\">\r\n @if (hasSources()) {\r\n <mat-list class=\"lib-data-source-picker__sources\">\r\n @for (row of rows(); track row.source.id) {\r\n <mat-list-item\r\n class=\"lib-data-source-picker__source\"\r\n matTooltipPosition=\"before\"\r\n [matTooltip]=\"row.source.source + ' ' + row.endpoint\">\r\n <mat-icon\r\n matListItemIcon\r\n class=\"lib-data-source-picker__icon\"\r\n [class.lib-data-source-picker__icon--api]=\"row.isApi\">\r\n {{ row.icon }}\r\n </mat-icon>\r\n <span matListItemTitle class=\"lib-data-source-picker__name\">{{ row.name }}</span>\r\n <span matListItemLine class=\"lib-data-source-picker__endpoint\">{{ row.endpoint }}</span>\r\n <button\r\n matListItemMeta\r\n mat-icon-button\r\n type=\"button\"\r\n [attr.aria-label]=\"'Remove ' + row.name\"\r\n [disabled]=\"disabled\"\r\n (click)=\"removeSource(row.source)\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n } @else {\r\n <lib-empty-state icon=\"storage\" message=\"No data sources configured. Add one to get started.\" />\r\n }\r\n</div>\r\n\r\n@if (draft(); as draft) {\r\n <mat-card appearance=\"outlined\" class=\"lib-data-source-picker__editor\">\r\n <mat-card-content>\r\n <label [attr.for]=\"id + '-type'\" class=\"lib-data-source-picker__label\">Select source type</label>\r\n <lib-mat-chip-list-editor\r\n [id]=\"id + '-type'\"\r\n [value]=\"draft.source\"\r\n [options]=\"dataSourceOptions\"\r\n (valueChange)=\"sourceTypeChanged($event)\" />\r\n\r\n @if (draft.source !== undefined) {\r\n @switch (draft.source) {\r\n @case (dataSources.Api) {\r\n <label [attr.for]=\"id + '-api'\" class=\"lib-data-source-picker__label\">Select API</label>\r\n <lib-rest-api-call-setup\r\n [id]=\"id + '-api'\"\r\n [postmanCollectionConfig]=\"editorConfig?.postmanCollectionConfig\"\r\n [httpGetDataFunction]=\"editorConfig?.httpGetDataFunction\"\r\n [value]=\"$any(draft.config)\"\r\n (valueChanged)=\"sourceConfigChanged($event)\" />\r\n\r\n @if (draftMinimumInputRequired(); as minimumInputRequired) {\r\n <lib-required-inputs\r\n [id]=\"id + '-required-inputs'\"\r\n [formInputs]=\"formInputs() || []\"\r\n [value]=\"minimumInputRequired\"\r\n [errors]=\"[]\"\r\n (valueChanged)=\"minimumInputRequiredValueChanged($event)\" />\r\n }\r\n }\r\n @case (dataSources.MongoDb) {\r\n <label [attr.for]=\"id + '-pipeline'\" class=\"lib-data-source-picker__label\">Add a MongoDB pipeline</label>\r\n <lib-pipeline-generator\r\n [id]=\"id + '-pipeline'\"\r\n [value]=\"$any(draft.config)\"\r\n [getWorkflowOptions]=\"editorConfig?.getWorkflowOptions\"\r\n (valueChanged)=\"sourceConfigChanged($event)\" />\r\n }\r\n }\r\n }\r\n </mat-card-content>\r\n\r\n <mat-card-actions class=\"lib-data-source-picker__actions\">\r\n <button mat-flat-button color=\"primary\" type=\"button\" (click)=\"saveNewSource()\">Save source</button>\r\n <span class=\"lib-data-source-picker__spacer\"></span>\r\n <button mat-button color=\"warn\" type=\"button\" (click)=\"cancelEditing()\">Cancel</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n} @else {\r\n <button\r\n mat-stroked-button\r\n color=\"primary\"\r\n type=\"button\"\r\n class=\"lib-data-source-picker__add\"\r\n [disabled]=\"disabled\"\r\n (click)=\"startEditing()\">\r\n <mat-icon>add</mat-icon>\r\n Add data source\r\n </button>\r\n}\r\n", styles: [":host{display:block}.lib-data-source-picker__list{display:block}.lib-data-source-picker__sources{padding:0}.lib-data-source-picker__source{border-radius:var(--lib-forms-radius-sm, 8px)}.lib-data-source-picker__icon{color:var(--lib-forms-on-surface-variant)}.lib-data-source-picker__icon--api{color:var(--lib-forms-primary)}.lib-data-source-picker__name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lib-data-source-picker__endpoint{color:var(--lib-forms-on-surface-variant);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lib-data-source-picker__editor{margin-top:1.5rem;background:var(--lib-forms-surface)}.lib-data-source-picker__label{display:block;margin-top:.75rem;margin-bottom:.5rem;font-size:.625rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--lib-forms-on-surface-variant)}.lib-data-source-picker__actions{display:flex;align-items:center;margin-top:1.5rem}.lib-data-source-picker__spacer{flex:1 1 auto}.lib-data-source-picker__add{width:100%;margin-top:1.5rem}:host(.lib-data-source-picker--disabled){opacity:.55;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type:
|
|
229
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DataSourcePickerComponent, isStandalone: true, selector: "lib-data-source-picker", inputs: { errors: { classPropertyName: "errors", publicName: "errors", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, editorConfig: { classPropertyName: "editorConfig", publicName: "editorConfig", isSignal: false, isRequired: false, transformFunction: null }, formInputs: { classPropertyName: "formInputs", publicName: "formInputs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.id": "id", "class.lib-data-source-picker--focused": "focused", "class.lib-data-source-picker--disabled": "disabled" }, classAttribute: "lib-data-source-picker" }, providers: [{ provide: MatFormFieldControl, useExisting: DataSourcePickerComponent }], ngImport: i0, template: "<div class=\"lib-data-source-picker__list\">\r\n @if (hasSources()) {\r\n <mat-list class=\"lib-data-source-picker__sources\">\r\n @for (row of rows(); track row.source.id) {\r\n <mat-list-item\r\n class=\"lib-data-source-picker__source\"\r\n matTooltipPosition=\"before\"\r\n [matTooltip]=\"row.source.source + ' ' + row.endpoint\">\r\n <mat-icon\r\n matListItemIcon\r\n class=\"lib-data-source-picker__icon\"\r\n [class.lib-data-source-picker__icon--api]=\"row.isApi\">\r\n {{ row.icon }}\r\n </mat-icon>\r\n <span matListItemTitle class=\"lib-data-source-picker__name\">{{ row.name }}</span>\r\n <span matListItemLine class=\"lib-data-source-picker__endpoint\">{{ row.endpoint }}</span>\r\n <button\r\n matListItemMeta\r\n mat-icon-button\r\n type=\"button\"\r\n [attr.aria-label]=\"'Remove ' + row.name\"\r\n [disabled]=\"disabled\"\r\n (click)=\"removeSource(row.source)\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n } @else {\r\n <lib-empty-state icon=\"storage\" message=\"No data sources configured. Add one to get started.\" />\r\n }\r\n</div>\r\n\r\n@if (draft(); as draft) {\r\n <mat-card appearance=\"outlined\" class=\"lib-data-source-picker__editor\">\r\n <mat-card-content>\r\n <label [attr.for]=\"id + '-type'\" class=\"lib-data-source-picker__label\">Select source type</label>\r\n <lib-mat-chip-list-editor\r\n [id]=\"id + '-type'\"\r\n [value]=\"draft.source\"\r\n [options]=\"dataSourceOptions\"\r\n (valueChange)=\"sourceTypeChanged($event)\" />\r\n\r\n @if (draft.source !== undefined) {\r\n @switch (draft.source) {\r\n @case (dataSources.Api) {\r\n <label [attr.for]=\"id + '-api'\" class=\"lib-data-source-picker__label\">Select API</label>\r\n <lib-rest-api-call-setup\r\n [id]=\"id + '-api'\"\r\n [postmanCollectionConfig]=\"editorConfig?.postmanCollectionConfig\"\r\n [httpGetDataFunction]=\"editorConfig?.httpGetDataFunction\"\r\n [value]=\"$any(draft.config)\"\r\n (valueChanged)=\"sourceConfigChanged($event)\" />\r\n\r\n @if (draftMinimumInputRequired(); as minimumInputRequired) {\r\n <lib-required-inputs\r\n [id]=\"id + '-required-inputs'\"\r\n [formInputs]=\"formInputs() || []\"\r\n [value]=\"minimumInputRequired\"\r\n [errors]=\"[]\"\r\n (valueChanged)=\"minimumInputRequiredValueChanged($event)\" />\r\n }\r\n }\r\n @case (dataSources.MongoDb) {\r\n <label [attr.for]=\"id + '-pipeline'\" class=\"lib-data-source-picker__label\">Add a MongoDB pipeline</label>\r\n <lib-pipeline-generator\r\n [id]=\"id + '-pipeline'\"\r\n [value]=\"$any(draft.config)\"\r\n [getWorkflowOptions]=\"editorConfig?.getWorkflowOptions\"\r\n (valueChanged)=\"sourceConfigChanged($event)\" />\r\n }\r\n }\r\n }\r\n </mat-card-content>\r\n\r\n <mat-card-actions class=\"lib-data-source-picker__actions\">\r\n <button mat-flat-button color=\"primary\" type=\"button\" (click)=\"saveNewSource()\">Save source</button>\r\n <span class=\"lib-data-source-picker__spacer\"></span>\r\n <button mat-button color=\"warn\" type=\"button\" (click)=\"cancelEditing()\">Cancel</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n} @else {\r\n <button\r\n mat-stroked-button\r\n color=\"primary\"\r\n type=\"button\"\r\n class=\"lib-data-source-picker__add\"\r\n [disabled]=\"disabled\"\r\n (click)=\"startEditing()\">\r\n <mat-icon>add</mat-icon>\r\n Add data source\r\n </button>\r\n}\r\n", styles: [":host{display:block}.lib-data-source-picker__list{display:block}.lib-data-source-picker__sources{padding:0}.lib-data-source-picker__source{border-radius:var(--lib-forms-radius-sm, 8px)}.lib-data-source-picker__icon{color:var(--lib-forms-on-surface-variant)}.lib-data-source-picker__icon--api{color:var(--lib-forms-primary)}.lib-data-source-picker__name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lib-data-source-picker__endpoint{color:var(--lib-forms-on-surface-variant);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lib-data-source-picker__editor{margin-top:1.5rem;background:var(--lib-forms-surface)}.lib-data-source-picker__label{display:block;margin-top:.75rem;margin-bottom:.5rem;font-size:.625rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--lib-forms-on-surface-variant)}.lib-data-source-picker__actions{display:flex;align-items:center;margin-top:1.5rem}.lib-data-source-picker__spacer{flex:1 1 auto}.lib-data-source-picker__add{width:100%;margin-top:1.5rem}:host(.lib-data-source-picker--disabled){opacity:.55;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i6.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i6.MatListItemLine, selector: "[matListItemLine]" }, { kind: "directive", type: i6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: EmptyStateComponent, selector: "lib-empty-state", inputs: ["icon", "message"] }, { kind: "component", type: MatChipListEditorComponent, selector: "lib-mat-chip-list-editor", inputs: ["disabled", "multiple", "required", "errors", "value", "options"], outputs: ["valueChange"] }, { kind: "component", type: PipelineGeneratorComponent, selector: "lib-pipeline-generator", inputs: ["disabled", "value", "getWorkflowOptions", "userName", "errors"], outputs: ["valueChanged"] }, { kind: "component", type: RequiredInputsComponent, selector: "lib-required-inputs", inputs: ["value", "formInputs", "disabled", "offerSearch", "errors", "id"], outputs: ["valueChanged"] }, { kind: "component", type: RestApiCallSetupComponent, selector: "lib-rest-api-call-setup", inputs: ["id", "postmanCollectionConfig", "httpGetDataFunction", "disabled", "value", "errors"], outputs: ["valueChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
230
230
|
}
|
|
231
231
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DataSourcePickerComponent, decorators: [{
|
|
232
232
|
type: Component,
|
|
@@ -258,4 +258,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
258
258
|
}], formInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "formInputs", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
259
259
|
|
|
260
260
|
export { DataSourcePickerComponent };
|
|
261
|
-
//# sourceMappingURL=ngx-t-forms-data-source-picker.component-
|
|
261
|
+
//# sourceMappingURL=ngx-t-forms-data-source-picker.component-BG_sr5VH.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-data-source-picker.component-DioXvLi3.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/data-source-picker/data-source-picker.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/data-source-picker/data-source-picker.component.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n Input,\r\n ViewEncapsulation,\r\n computed,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { Subject } from 'rxjs';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport {\r\n APIDataFetchingConfigurationInterface,\r\n DataSources,\r\n ElementEditorInnerSectionElementInterface,\r\n FormColumnInputs,\r\n IReportDataSources,\r\n MinimumInputRequiredInterface,\r\n MongoDbPipeLineConfigInterface,\r\n} from 'ngx-t-forms-types';\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\nimport { MatChipListEditorComponent } from '../mat-chip-list-editor/mat-chip-list-editor.component';\r\nimport { PipelineGeneratorComponent } from '../pipeline-generator/pipeline-generator.component';\r\nimport { RequiredInputsComponent } from '../required-inputs/required-inputs.component';\r\nimport { RestApiCallSetupComponent } from '../rest-api-call-setup/rest-api-call-setup.component';\r\n\r\n/** Source-type option rendered in the chip selector. */\r\ninterface DataSourceOption {\r\n label: string;\r\n value: DataSources;\r\n}\r\n\r\n/** A configured data source decorated with the derived fields the list row renders. */\r\ninterface DataSourceRow {\r\n readonly source: IReportDataSources;\r\n readonly name: string;\r\n readonly icon: string;\r\n readonly endpoint: string;\r\n readonly isApi: boolean;\r\n}\r\n\r\n/** The in-edit working draft: a partial source being composed before save. */\r\ntype DataSourceDraft = Partial<IReportDataSources>;\r\n\r\n/**\r\n * Internal editor element for configuring a report's data sources (API calls and\r\n * MongoDB pipelines). It is a real `MatFormFieldControl`, rendered by\r\n * `t-dynamic-data-edit` inside a `<mat-form-field>` — so the parent owns the\r\n * surrounding label, hint, and validation errors, and this component owns only\r\n * the source list, the inline editor card, and the add affordance.\r\n *\r\n * NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /\r\n * `required` / `placeholder` / `id` members, `@Input()` decorators, the\r\n * `focused` / `touched` / `stateChanges` members, and the `useExisting`\r\n * provider. These are framework wiring, not defects — the CLAUDE.md bans on\r\n * `@Input()` / `useExisting` do not apply to MatFormFieldControl integration.\r\n */\r\n@Component({\r\n selector: 'lib-data-source-picker',\r\n imports: [\r\n MatButtonModule,\r\n MatCardModule,\r\n MatIconModule,\r\n MatListModule,\r\n MatTooltipModule,\r\n EmptyStateComponent,\r\n MatChipListEditorComponent,\r\n PipelineGeneratorComponent,\r\n RequiredInputsComponent,\r\n RestApiCallSetupComponent,\r\n ],\r\n templateUrl: './data-source-picker.component.html',\r\n styleUrl: './data-source-picker.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n providers: [{ provide: MatFormFieldControl, useExisting: DataSourcePickerComponent }],\r\n host: {\r\n 'class': 'lib-data-source-picker',\r\n '[attr.id]': 'id',\r\n '[class.lib-data-source-picker--focused]': 'focused',\r\n '[class.lib-data-source-picker--disabled]': 'disabled',\r\n },\r\n})\r\nexport class DataSourcePickerComponent\r\n implements MatFormFieldControl<Array<IReportDataSources> | undefined>\r\n{\r\n static nextId = 0;\r\n\r\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\r\n readonly stateChanges = new Subject<void>();\r\n readonly controlType = 'lib-data-source-picker';\r\n\r\n id = `lib-data-source-picker-${DataSourcePickerComponent.nextId++}`;\r\n placeholder = '';\r\n focused = false;\r\n touched = false;\r\n required = false;\r\n describedBy = '';\r\n autofilled = false;\r\n userAriaDescribedBy: string | undefined = undefined;\r\n disableAutomaticLabeling: boolean | undefined = undefined;\r\n\r\n /** Validation errors surfaced by the parent for error-state derivation. */\r\n @Input() errors: IConfigElementError[] | undefined = [];\r\n\r\n #disabled = false;\r\n /** Whether the control is inert. */\r\n @Input()\r\n get disabled(): boolean {\r\n return this.#disabled;\r\n }\r\n set disabled(value: boolean) {\r\n this.#disabled = value;\r\n this.stateChanges.next();\r\n }\r\n\r\n // Mirror of the plain MFC `value` member, so the template + computeds react.\r\n readonly #value = signal<Array<IReportDataSources> | undefined>(undefined);\r\n\r\n /** Current list of configured data sources. */\r\n @Input()\r\n get value(): Array<IReportDataSources> | undefined {\r\n return this.#value();\r\n }\r\n set value(value: Array<IReportDataSources> | undefined) {\r\n if (this.#value() === value) {\r\n return;\r\n }\r\n this.#value.set(value);\r\n this.stateChanges.next();\r\n }\r\n\r\n // Mirror of the plain `editorConfig` member, so the template reacts.\r\n readonly #editorConfig = signal<ElementEditorInnerSectionElementInterface | undefined>(\r\n undefined,\r\n );\r\n\r\n /** Editor configuration supplying postman / workflow option providers. */\r\n @Input()\r\n get editorConfig(): ElementEditorInnerSectionElementInterface | undefined {\r\n return this.#editorConfig();\r\n }\r\n set editorConfig(config: ElementEditorInnerSectionElementInterface | undefined) {\r\n this.#editorConfig.set(config);\r\n }\r\n\r\n /** All available form inputs the user can map a required input to. */\r\n readonly formInputs = input<Array<FormColumnInputs>>([]);\r\n\r\n /** Emits the mutated data-source list whenever the user adds or removes a source. */\r\n readonly valueChange = output<Array<IReportDataSources> | undefined>();\r\n\r\n readonly ngControl = inject(NgControl, { self: true, optional: true });\r\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n /** Source-type enum, exposed to the template. */\r\n protected readonly dataSources = DataSources;\r\n\r\n /** The selectable source types in the chip selector. */\r\n protected readonly dataSourceOptions: DataSourceOption[] = [\r\n { label: 'API', value: DataSources.Api },\r\n { label: 'MongoDB', value: DataSources.MongoDb },\r\n ];\r\n\r\n /** The in-edit draft, or `undefined` when the editor card is closed. */\r\n protected readonly draft = signal<DataSourceDraft | undefined>(undefined);\r\n\r\n /** Decorated rows for the configured-source list. */\r\n protected readonly rows = computed<readonly DataSourceRow[]>(() =>\r\n (this.#value() ?? []).map((source, index) => ({\r\n source,\r\n name: this.#name(source, index),\r\n icon: source.source === DataSources.Api ? 'api' : 'storage',\r\n endpoint: this.#endpoint(source),\r\n isApi: source.source === DataSources.Api,\r\n })),\r\n );\r\n\r\n /** Whether any data source is configured. */\r\n protected readonly hasSources = computed<boolean>(() => (this.#value() ?? []).length > 0);\r\n\r\n /** The `minimumInputRequired` list of the draft's API config, or `undefined`. */\r\n protected readonly draftMinimumInputRequired = computed<\r\n readonly MinimumInputRequiredInterface[] | undefined\r\n >(() => {\r\n const config = this.draft()?.config;\r\n if (!config || !this.#isApiConfig(config)) {\r\n return undefined;\r\n }\r\n return config.backEndConfig?.minimumInputRequired;\r\n });\r\n\r\n // ---- MatFormFieldControl getters (read during the framework's CD) --------\r\n\r\n get empty(): boolean {\r\n return (this.#value() ?? []).length === 0;\r\n }\r\n\r\n get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n get errorState(): boolean {\r\n const requiredUnset = this.empty && this.required;\r\n const ngControlError = this.ngControl?.errors != null;\r\n const externalError = (this.errors?.length ?? 0) > 0 && this.touched;\r\n return requiredUnset || ngControlError || externalError;\r\n }\r\n\r\n setDescribedByIds(ids: string[]): void {\r\n this.describedBy = ids.join(' ');\r\n const el = this.#elementRef.nativeElement;\r\n const control = el.querySelector('.lib-data-source-picker__list');\r\n control?.setAttribute('aria-describedby', this.describedBy);\r\n this.stateChanges.next();\r\n }\r\n\r\n onContainerClick(): void {\r\n this.markAsTouched();\r\n if (!this.focused) {\r\n this.focused = true;\r\n }\r\n this.stateChanges.next();\r\n }\r\n\r\n onTouched: () => void = () => {};\r\n\r\n markAsTouched(): void {\r\n if (!this.touched) {\r\n this.touched = true;\r\n this.onTouched();\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n // ---- Draft editing -------------------------------------------------------\r\n\r\n /** Open the editor card with an empty draft. */\r\n protected startEditing(): void {\r\n this.draft.set({});\r\n }\r\n\r\n /** Discard the draft and close the editor card. */\r\n protected cancelEditing(): void {\r\n this.draft.set(undefined);\r\n }\r\n\r\n /** Set the draft's source type. Child chip editor emits an unknown payload. */\r\n protected sourceTypeChanged(source: unknown): void {\r\n this.draft.update((current) =>\r\n current ? { ...current, source: source as DataSources | undefined } : current,\r\n );\r\n }\r\n\r\n /** Set the draft's source config (API setup or pipeline). */\r\n protected sourceConfigChanged(\r\n config: APIDataFetchingConfigurationInterface | MongoDbPipeLineConfigInterface | undefined,\r\n ): void {\r\n this.draft.update((current) => (current ? { ...current, config } : current));\r\n }\r\n\r\n /** Merge the required-input list into the draft's API config. */\r\n protected minimumInputRequiredValueChanged(\r\n value: Array<MinimumInputRequiredInterface>,\r\n ): void {\r\n this.draft.update((current) => {\r\n if (!current?.config || !this.#isApiConfig(current.config)) {\r\n return current;\r\n }\r\n const config: APIDataFetchingConfigurationInterface = {\r\n ...current.config,\r\n backEndConfig: { ...current.config.backEndConfig, minimumInputRequired: value },\r\n };\r\n return { ...current, config };\r\n });\r\n }\r\n\r\n /** Commit the draft as a new source (assigning a fresh id) and emit. */\r\n protected saveNewSource(): void {\r\n const current = this.draft();\r\n if (!current) {\r\n return;\r\n }\r\n const data: IReportDataSources = { ...current, id: crypto.randomUUID() } as IReportDataSources;\r\n const next = [...(this.#value() ?? []), data];\r\n this.value = next;\r\n this.draft.set(undefined);\r\n this.markAsTouched();\r\n this.valueChange.emit(next);\r\n }\r\n\r\n /** Remove a configured source by id and emit. */\r\n protected removeSource(source: IReportDataSources): void {\r\n const current = this.#value();\r\n if (!current) {\r\n return;\r\n }\r\n const next = current.filter((item) => item.id !== source.id);\r\n this.value = next;\r\n this.markAsTouched();\r\n this.valueChange.emit(next);\r\n }\r\n\r\n #name(value: IReportDataSources, index: number): string {\r\n if (this.#isApiConfig(value.config) && value.config.name) {\r\n return value.config.name;\r\n }\r\n return value.source === DataSources.Api ? `API ${index + 1}` : `MongoDB ${index + 1}`;\r\n }\r\n\r\n #endpoint(value: IReportDataSources): string {\r\n if (this.#isApiConfig(value.config)) {\r\n return value.config.httpEndPoint ?? '';\r\n }\r\n return value.config.workflowId ?? '';\r\n }\r\n\r\n #isApiConfig(\r\n config: APIDataFetchingConfigurationInterface | MongoDbPipeLineConfigInterface | undefined,\r\n ): config is APIDataFetchingConfigurationInterface {\r\n return config?.source === DataSources.Api;\r\n }\r\n}\r\n","<div class=\"lib-data-source-picker__list\">\r\n @if (hasSources()) {\r\n <mat-list class=\"lib-data-source-picker__sources\">\r\n @for (row of rows(); track row.source.id) {\r\n <mat-list-item\r\n class=\"lib-data-source-picker__source\"\r\n matTooltipPosition=\"before\"\r\n [matTooltip]=\"row.source.source + ' ' + row.endpoint\">\r\n <mat-icon\r\n matListItemIcon\r\n class=\"lib-data-source-picker__icon\"\r\n [class.lib-data-source-picker__icon--api]=\"row.isApi\">\r\n {{ row.icon }}\r\n </mat-icon>\r\n <span matListItemTitle class=\"lib-data-source-picker__name\">{{ row.name }}</span>\r\n <span matListItemLine class=\"lib-data-source-picker__endpoint\">{{ row.endpoint }}</span>\r\n <button\r\n matListItemMeta\r\n mat-icon-button\r\n type=\"button\"\r\n [attr.aria-label]=\"'Remove ' + row.name\"\r\n [disabled]=\"disabled\"\r\n (click)=\"removeSource(row.source)\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n } @else {\r\n <lib-empty-state icon=\"storage\" message=\"No data sources configured. Add one to get started.\" />\r\n }\r\n</div>\r\n\r\n@if (draft(); as draft) {\r\n <mat-card appearance=\"outlined\" class=\"lib-data-source-picker__editor\">\r\n <mat-card-content>\r\n <label [attr.for]=\"id + '-type'\" class=\"lib-data-source-picker__label\">Select source type</label>\r\n <lib-mat-chip-list-editor\r\n [id]=\"id + '-type'\"\r\n [value]=\"draft.source\"\r\n [options]=\"dataSourceOptions\"\r\n (valueChange)=\"sourceTypeChanged($event)\" />\r\n\r\n @if (draft.source !== undefined) {\r\n @switch (draft.source) {\r\n @case (dataSources.Api) {\r\n <label [attr.for]=\"id + '-api'\" class=\"lib-data-source-picker__label\">Select API</label>\r\n <lib-rest-api-call-setup\r\n [id]=\"id + '-api'\"\r\n [postmanCollectionConfig]=\"editorConfig?.postmanCollectionConfig\"\r\n [httpGetDataFunction]=\"editorConfig?.httpGetDataFunction\"\r\n [value]=\"$any(draft.config)\"\r\n (valueChanged)=\"sourceConfigChanged($event)\" />\r\n\r\n @if (draftMinimumInputRequired(); as minimumInputRequired) {\r\n <lib-required-inputs\r\n [id]=\"id + '-required-inputs'\"\r\n [formInputs]=\"formInputs() || []\"\r\n [value]=\"minimumInputRequired\"\r\n [errors]=\"[]\"\r\n (valueChanged)=\"minimumInputRequiredValueChanged($event)\" />\r\n }\r\n }\r\n @case (dataSources.MongoDb) {\r\n <label [attr.for]=\"id + '-pipeline'\" class=\"lib-data-source-picker__label\">Add a MongoDB pipeline</label>\r\n <lib-pipeline-generator\r\n [id]=\"id + '-pipeline'\"\r\n [value]=\"$any(draft.config)\"\r\n [getWorkflowOptions]=\"editorConfig?.getWorkflowOptions\"\r\n (valueChanged)=\"sourceConfigChanged($event)\" />\r\n }\r\n }\r\n }\r\n </mat-card-content>\r\n\r\n <mat-card-actions class=\"lib-data-source-picker__actions\">\r\n <button mat-flat-button color=\"primary\" type=\"button\" (click)=\"saveNewSource()\">Save source</button>\r\n <span class=\"lib-data-source-picker__spacer\"></span>\r\n <button mat-button color=\"warn\" type=\"button\" (click)=\"cancelEditing()\">Cancel</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n} @else {\r\n <button\r\n mat-stroked-button\r\n color=\"primary\"\r\n type=\"button\"\r\n class=\"lib-data-source-picker__add\"\r\n [disabled]=\"disabled\"\r\n (click)=\"startEditing()\">\r\n <mat-icon>add</mat-icon>\r\n Add data source\r\n </button>\r\n}\r\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsDA;;;;;;;;;;;;AAYG;MA2BU,yBAAyB,CAAA;AA1BtC,IAAA,WAAA,GAAA;;AAgCW,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QAClC,IAAA,CAAA,WAAW,GAAG,wBAAwB;AAE/C,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,uBAAA,EAA0B,yBAAyB,CAAC,MAAM,EAAE,EAAE;QACnE,IAAA,CAAA,WAAW,GAAG,EAAE;QAChB,IAAA,CAAA,OAAO,GAAG,KAAK;QACf,IAAA,CAAA,OAAO,GAAG,KAAK;QACf,IAAA,CAAA,QAAQ,GAAG,KAAK;QAChB,IAAA,CAAA,WAAW,GAAG,EAAE;QAChB,IAAA,CAAA,UAAU,GAAG,KAAK;QAClB,IAAA,CAAA,mBAAmB,GAAuB,SAAS;QACnD,IAAA,CAAA,wBAAwB,GAAwB,SAAS;;QAGhD,IAAA,C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{"version":3,"file":"ngx-t-forms-data-source-picker.component-BG_sr5VH.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/data-source-picker/data-source-picker.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/data-source-picker/data-source-picker.component.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n Input,\r\n ViewEncapsulation,\r\n computed,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { Subject } from 'rxjs';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport {\r\n APIDataFetchingConfigurationInterface,\r\n DataSources,\r\n ElementEditorInnerSectionElementInterface,\r\n FormColumnInputs,\r\n IReportDataSources,\r\n MinimumInputRequiredInterface,\r\n MongoDbPipeLineConfigInterface,\r\n} from 'ngx-t-forms-types';\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\nimport { MatChipListEditorComponent } from '../mat-chip-list-editor/mat-chip-list-editor.component';\r\nimport { PipelineGeneratorComponent } from '../pipeline-generator/pipeline-generator.component';\r\nimport { RequiredInputsComponent } from '../required-inputs/required-inputs.component';\r\nimport { RestApiCallSetupComponent } from '../rest-api-call-setup/rest-api-call-setup.component';\r\n\r\n/** Source-type option rendered in the chip selector. */\r\ninterface DataSourceOption {\r\n label: string;\r\n value: DataSources;\r\n}\r\n\r\n/** A configured data source decorated with the derived fields the list row renders. */\r\ninterface DataSourceRow {\r\n readonly source: IReportDataSources;\r\n readonly name: string;\r\n readonly icon: string;\r\n readonly endpoint: string;\r\n readonly isApi: boolean;\r\n}\r\n\r\n/** The in-edit working draft: a partial source being composed before save. */\r\ntype DataSourceDraft = Partial<IReportDataSources>;\r\n\r\n/**\r\n * Internal editor element for configuring a report's data sources (API calls and\r\n * MongoDB pipelines). It is a real `MatFormFieldControl`, rendered by\r\n * `t-dynamic-data-edit` inside a `<mat-form-field>` — so the parent owns the\r\n * surrounding label, hint, and validation errors, and this component owns only\r\n * the source list, the inline editor card, and the add affordance.\r\n *\r\n * NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /\r\n * `required` / `placeholder` / `id` members, `@Input()` decorators, the\r\n * `focused` / `touched` / `stateChanges` members, and the `useExisting`\r\n * provider. These are framework wiring, not defects — the CLAUDE.md bans on\r\n * `@Input()` / `useExisting` do not apply to MatFormFieldControl integration.\r\n */\r\n@Component({\r\n selector: 'lib-data-source-picker',\r\n imports: [\r\n MatButtonModule,\r\n MatCardModule,\r\n MatIconModule,\r\n MatListModule,\r\n MatTooltipModule,\r\n EmptyStateComponent,\r\n MatChipListEditorComponent,\r\n PipelineGeneratorComponent,\r\n RequiredInputsComponent,\r\n RestApiCallSetupComponent,\r\n ],\r\n templateUrl: './data-source-picker.component.html',\r\n styleUrl: './data-source-picker.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n providers: [{ provide: MatFormFieldControl, useExisting: DataSourcePickerComponent }],\r\n host: {\r\n 'class': 'lib-data-source-picker',\r\n '[attr.id]': 'id',\r\n '[class.lib-data-source-picker--focused]': 'focused',\r\n '[class.lib-data-source-picker--disabled]': 'disabled',\r\n },\r\n})\r\nexport class DataSourcePickerComponent\r\n implements MatFormFieldControl<Array<IReportDataSources> | undefined>\r\n{\r\n static nextId = 0;\r\n\r\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\r\n readonly stateChanges = new Subject<void>();\r\n readonly controlType = 'lib-data-source-picker';\r\n\r\n id = `lib-data-source-picker-${DataSourcePickerComponent.nextId++}`;\r\n placeholder = '';\r\n focused = false;\r\n touched = false;\r\n required = false;\r\n describedBy = '';\r\n autofilled = false;\r\n userAriaDescribedBy: string | undefined = undefined;\r\n disableAutomaticLabeling: boolean | undefined = undefined;\r\n\r\n /** Validation errors surfaced by the parent for error-state derivation. */\r\n @Input() errors: IConfigElementError[] | undefined = [];\r\n\r\n #disabled = false;\r\n /** Whether the control is inert. */\r\n @Input()\r\n get disabled(): boolean {\r\n return this.#disabled;\r\n }\r\n set disabled(value: boolean) {\r\n this.#disabled = value;\r\n this.stateChanges.next();\r\n }\r\n\r\n // Mirror of the plain MFC `value` member, so the template + computeds react.\r\n readonly #value = signal<Array<IReportDataSources> | undefined>(undefined);\r\n\r\n /** Current list of configured data sources. */\r\n @Input()\r\n get value(): Array<IReportDataSources> | undefined {\r\n return this.#value();\r\n }\r\n set value(value: Array<IReportDataSources> | undefined) {\r\n if (this.#value() === value) {\r\n return;\r\n }\r\n this.#value.set(value);\r\n this.stateChanges.next();\r\n }\r\n\r\n // Mirror of the plain `editorConfig` member, so the template reacts.\r\n readonly #editorConfig = signal<ElementEditorInnerSectionElementInterface | undefined>(\r\n undefined,\r\n );\r\n\r\n /** Editor configuration supplying postman / workflow option providers. */\r\n @Input()\r\n get editorConfig(): ElementEditorInnerSectionElementInterface | undefined {\r\n return this.#editorConfig();\r\n }\r\n set editorConfig(config: ElementEditorInnerSectionElementInterface | undefined) {\r\n this.#editorConfig.set(config);\r\n }\r\n\r\n /** All available form inputs the user can map a required input to. */\r\n readonly formInputs = input<Array<FormColumnInputs>>([]);\r\n\r\n /** Emits the mutated data-source list whenever the user adds or removes a source. */\r\n readonly valueChange = output<Array<IReportDataSources> | undefined>();\r\n\r\n readonly ngControl = inject(NgControl, { self: true, optional: true });\r\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n /** Source-type enum, exposed to the template. */\r\n protected readonly dataSources = DataSources;\r\n\r\n /** The selectable source types in the chip selector. */\r\n protected readonly dataSourceOptions: DataSourceOption[] = [\r\n { label: 'API', value: DataSources.Api },\r\n { label: 'MongoDB', value: DataSources.MongoDb },\r\n ];\r\n\r\n /** The in-edit draft, or `undefined` when the editor card is closed. */\r\n protected readonly draft = signal<DataSourceDraft | undefined>(undefined);\r\n\r\n /** Decorated rows for the configured-source list. */\r\n protected readonly rows = computed<readonly DataSourceRow[]>(() =>\r\n (this.#value() ?? []).map((source, index) => ({\r\n source,\r\n name: this.#name(source, index),\r\n icon: source.source === DataSources.Api ? 'api' : 'storage',\r\n endpoint: this.#endpoint(source),\r\n isApi: source.source === DataSources.Api,\r\n })),\r\n );\r\n\r\n /** Whether any data source is configured. */\r\n protected readonly hasSources = computed<boolean>(() => (this.#value() ?? []).length > 0);\r\n\r\n /** The `minimumInputRequired` list of the draft's API config, or `undefined`. */\r\n protected readonly draftMinimumInputRequired = computed<\r\n readonly MinimumInputRequiredInterface[] | undefined\r\n >(() => {\r\n const config = this.draft()?.config;\r\n if (!config || !this.#isApiConfig(config)) {\r\n return undefined;\r\n }\r\n return config.backEndConfig?.minimumInputRequired;\r\n });\r\n\r\n // ---- MatFormFieldControl getters (read during the framework's CD) --------\r\n\r\n get empty(): boolean {\r\n return (this.#value() ?? []).length === 0;\r\n }\r\n\r\n get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n get errorState(): boolean {\r\n const requiredUnset = this.empty && this.required;\r\n const ngControlError = this.ngControl?.errors != null;\r\n const externalError = (this.errors?.length ?? 0) > 0 && this.touched;\r\n return requiredUnset || ngControlError || externalError;\r\n }\r\n\r\n setDescribedByIds(ids: string[]): void {\r\n this.describedBy = ids.join(' ');\r\n const el = this.#elementRef.nativeElement;\r\n const control = el.querySelector('.lib-data-source-picker__list');\r\n control?.setAttribute('aria-describedby', this.describedBy);\r\n this.stateChanges.next();\r\n }\r\n\r\n onContainerClick(): void {\r\n this.markAsTouched();\r\n if (!this.focused) {\r\n this.focused = true;\r\n }\r\n this.stateChanges.next();\r\n }\r\n\r\n onTouched: () => void = () => {};\r\n\r\n markAsTouched(): void {\r\n if (!this.touched) {\r\n this.touched = true;\r\n this.onTouched();\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n // ---- Draft editing -------------------------------------------------------\r\n\r\n /** Open the editor card with an empty draft. */\r\n protected startEditing(): void {\r\n this.draft.set({});\r\n }\r\n\r\n /** Discard the draft and close the editor card. */\r\n protected cancelEditing(): void {\r\n this.draft.set(undefined);\r\n }\r\n\r\n /** Set the draft's source type. Child chip editor emits an unknown payload. */\r\n protected sourceTypeChanged(source: unknown): void {\r\n this.draft.update((current) =>\r\n current ? { ...current, source: source as DataSources | undefined } : current,\r\n );\r\n }\r\n\r\n /** Set the draft's source config (API setup or pipeline). */\r\n protected sourceConfigChanged(\r\n config: APIDataFetchingConfigurationInterface | MongoDbPipeLineConfigInterface | undefined,\r\n ): void {\r\n this.draft.update((current) => (current ? { ...current, config } : current));\r\n }\r\n\r\n /** Merge the required-input list into the draft's API config. */\r\n protected minimumInputRequiredValueChanged(\r\n value: Array<MinimumInputRequiredInterface>,\r\n ): void {\r\n this.draft.update((current) => {\r\n if (!current?.config || !this.#isApiConfig(current.config)) {\r\n return current;\r\n }\r\n const config: APIDataFetchingConfigurationInterface = {\r\n ...current.config,\r\n backEndConfig: { ...current.config.backEndConfig, minimumInputRequired: value },\r\n };\r\n return { ...current, config };\r\n });\r\n }\r\n\r\n /** Commit the draft as a new source (assigning a fresh id) and emit. */\r\n protected saveNewSource(): void {\r\n const current = this.draft();\r\n if (!current) {\r\n return;\r\n }\r\n const data: IReportDataSources = { ...current, id: crypto.randomUUID() } as IReportDataSources;\r\n const next = [...(this.#value() ?? []), data];\r\n this.value = next;\r\n this.draft.set(undefined);\r\n this.markAsTouched();\r\n this.valueChange.emit(next);\r\n }\r\n\r\n /** Remove a configured source by id and emit. */\r\n protected removeSource(source: IReportDataSources): void {\r\n const current = this.#value();\r\n if (!current) {\r\n return;\r\n }\r\n const next = current.filter((item) => item.id !== source.id);\r\n this.value = next;\r\n this.markAsTouched();\r\n this.valueChange.emit(next);\r\n }\r\n\r\n #name(value: IReportDataSources, index: number): string {\r\n if (this.#isApiConfig(value.config) && value.config.name) {\r\n return value.config.name;\r\n }\r\n return value.source === DataSources.Api ? `API ${index + 1}` : `MongoDB ${index + 1}`;\r\n }\r\n\r\n #endpoint(value: IReportDataSources): string {\r\n if (this.#isApiConfig(value.config)) {\r\n return value.config.httpEndPoint ?? '';\r\n }\r\n return value.config.workflowId ?? '';\r\n }\r\n\r\n #isApiConfig(\r\n config: APIDataFetchingConfigurationInterface | MongoDbPipeLineConfigInterface | undefined,\r\n ): config is APIDataFetchingConfigurationInterface {\r\n return config?.source === DataSources.Api;\r\n }\r\n}\r\n","<div class=\"lib-data-source-picker__list\">\r\n @if (hasSources()) {\r\n <mat-list class=\"lib-data-source-picker__sources\">\r\n @for (row of rows(); track row.source.id) {\r\n <mat-list-item\r\n class=\"lib-data-source-picker__source\"\r\n matTooltipPosition=\"before\"\r\n [matTooltip]=\"row.source.source + ' ' + row.endpoint\">\r\n <mat-icon\r\n matListItemIcon\r\n class=\"lib-data-source-picker__icon\"\r\n [class.lib-data-source-picker__icon--api]=\"row.isApi\">\r\n {{ row.icon }}\r\n </mat-icon>\r\n <span matListItemTitle class=\"lib-data-source-picker__name\">{{ row.name }}</span>\r\n <span matListItemLine class=\"lib-data-source-picker__endpoint\">{{ row.endpoint }}</span>\r\n <button\r\n matListItemMeta\r\n mat-icon-button\r\n type=\"button\"\r\n [attr.aria-label]=\"'Remove ' + row.name\"\r\n [disabled]=\"disabled\"\r\n (click)=\"removeSource(row.source)\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n } @else {\r\n <lib-empty-state icon=\"storage\" message=\"No data sources configured. Add one to get started.\" />\r\n }\r\n</div>\r\n\r\n@if (draft(); as draft) {\r\n <mat-card appearance=\"outlined\" class=\"lib-data-source-picker__editor\">\r\n <mat-card-content>\r\n <label [attr.for]=\"id + '-type'\" class=\"lib-data-source-picker__label\">Select source type</label>\r\n <lib-mat-chip-list-editor\r\n [id]=\"id + '-type'\"\r\n [value]=\"draft.source\"\r\n [options]=\"dataSourceOptions\"\r\n (valueChange)=\"sourceTypeChanged($event)\" />\r\n\r\n @if (draft.source !== undefined) {\r\n @switch (draft.source) {\r\n @case (dataSources.Api) {\r\n <label [attr.for]=\"id + '-api'\" class=\"lib-data-source-picker__label\">Select API</label>\r\n <lib-rest-api-call-setup\r\n [id]=\"id + '-api'\"\r\n [postmanCollectionConfig]=\"editorConfig?.postmanCollectionConfig\"\r\n [httpGetDataFunction]=\"editorConfig?.httpGetDataFunction\"\r\n [value]=\"$any(draft.config)\"\r\n (valueChanged)=\"sourceConfigChanged($event)\" />\r\n\r\n @if (draftMinimumInputRequired(); as minimumInputRequired) {\r\n <lib-required-inputs\r\n [id]=\"id + '-required-inputs'\"\r\n [formInputs]=\"formInputs() || []\"\r\n [value]=\"minimumInputRequired\"\r\n [errors]=\"[]\"\r\n (valueChanged)=\"minimumInputRequiredValueChanged($event)\" />\r\n }\r\n }\r\n @case (dataSources.MongoDb) {\r\n <label [attr.for]=\"id + '-pipeline'\" class=\"lib-data-source-picker__label\">Add a MongoDB pipeline</label>\r\n <lib-pipeline-generator\r\n [id]=\"id + '-pipeline'\"\r\n [value]=\"$any(draft.config)\"\r\n [getWorkflowOptions]=\"editorConfig?.getWorkflowOptions\"\r\n (valueChanged)=\"sourceConfigChanged($event)\" />\r\n }\r\n }\r\n }\r\n </mat-card-content>\r\n\r\n <mat-card-actions class=\"lib-data-source-picker__actions\">\r\n <button mat-flat-button color=\"primary\" type=\"button\" (click)=\"saveNewSource()\">Save source</button>\r\n <span class=\"lib-data-source-picker__spacer\"></span>\r\n <button mat-button color=\"warn\" type=\"button\" (click)=\"cancelEditing()\">Cancel</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n} @else {\r\n <button\r\n mat-stroked-button\r\n color=\"primary\"\r\n type=\"button\"\r\n class=\"l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B,EAAA,UAAA,EAAA,CAAA;kBA1BrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,EAAA,OAAA,EACzB;wBACP,eAAe;wBACf,aAAa;wBACb,aAAa;wBACb,aAAa;wBACb,gBAAgB;wBAChB,mBAAmB;wBACnB,0BAA0B;wBAC1B,0BAA0B;wBAC1B,uBAAuB;wBACvB,yBAAyB;AAC1B,qBAAA,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,yBAA2B,EAAE,CAAC,EAAA,IAAA,EAC/E;AACJ,wBAAA,OAAO,EAAE,wBAAwB;AACjC,wBAAA,WAAW,EAAE,IAAI;AACjB,wBAAA,yCAAyC,EAAE,SAAS;AACpD,wBAAA,0CAA0C,EAAE,UAAU;AACvD,qBAAA,EAAA,QAAA,EAAA,q6HAAA,EAAA,MAAA,EAAA,CAAA,4lCAAA,CAAA,EAAA;;sBAsBA;;sBAIA;;sBAaA;;sBAkBA;;;;;"}
|
|
@@ -2,19 +2,19 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { inject, ElementRef, input, ChangeDetectionStrategy, Component, output, computed } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { NgControl, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import { p as provideFormsDateAdapter } from './ngx-t-forms-forms-native-date-adapter-
|
|
6
|
-
import * as i2
|
|
5
|
+
import { p as provideFormsDateAdapter } from './ngx-t-forms-forms-native-date-adapter-h6fClNMS.mjs';
|
|
6
|
+
import * as i2 from '@angular/material/form-field';
|
|
7
7
|
import { MatFormFieldModule, MatFormFieldControl } from '@angular/material/form-field';
|
|
8
8
|
import * as i6 from '@angular/material/datepicker';
|
|
9
9
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
10
10
|
import * as i3 from '@angular/material/icon';
|
|
11
11
|
import { MatIconModule } from '@angular/material/icon';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i1$1 from '@angular/material/button';
|
|
13
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
14
|
import * as i5 from '@angular/material/tooltip';
|
|
15
15
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
|
-
import { B as BaseCustomInput,
|
|
17
|
-
import * as
|
|
16
|
+
import { B as BaseCustomInput, a9 as getInputErrorMessage, aa as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-C1kZpYIM.mjs';
|
|
17
|
+
import * as i4 from '@angular/material/input';
|
|
18
18
|
import { MatInputModule } from '@angular/material/input';
|
|
19
19
|
|
|
20
20
|
const customInputConfig = {
|
|
@@ -41,7 +41,7 @@ class DatePickerReactiveInputComponent extends BaseCustomInput {
|
|
|
41
41
|
this.onChange(this.value);
|
|
42
42
|
}
|
|
43
43
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DatePickerReactiveInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
44
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: DatePickerReactiveInputComponent, isStandalone: true, selector: "lib-date-picker-reactive-input", inputs: { picker: { classPropertyName: "picker", publicName: "picker", isSignal: true, isRequired: true, transformFunction: null }, inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.floating": "shouldLabelFloat", "id": "id" } }, providers: [{ provide: MatFormFieldControl, useExisting: DatePickerReactiveInputComponent }], usesInheritance: true, ngImport: i0, template: "<input\r\n[required]=\"inputConfig().required\"\r\n[disabled]=\"inputConfig().disabled || inputConfig().readonly\"\r\n[min]=\"inputConfig().min\"\r\n(dateChange)=\"changed($event)\"\r\n[value]=\"value\"\r\n[max]=\"inputConfig().max\" matInput\r\n[matDatepicker]=\"picker()\" />\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type:
|
|
44
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: DatePickerReactiveInputComponent, isStandalone: true, selector: "lib-date-picker-reactive-input", inputs: { picker: { classPropertyName: "picker", publicName: "picker", isSignal: true, isRequired: true, transformFunction: null }, inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.floating": "shouldLabelFloat", "id": "id" } }, providers: [{ provide: MatFormFieldControl, useExisting: DatePickerReactiveInputComponent }], usesInheritance: true, ngImport: i0, template: "<input\r\n[required]=\"inputConfig().required\"\r\n[disabled]=\"inputConfig().disabled || inputConfig().readonly\"\r\n[min]=\"inputConfig().min\"\r\n(dateChange)=\"changed($event)\"\r\n[value]=\"value\"\r\n[max]=\"inputConfig().max\" matInput\r\n[matDatepicker]=\"picker()\" />\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
45
45
|
}
|
|
46
46
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DatePickerReactiveInputComponent, decorators: [{
|
|
47
47
|
type: Component,
|
|
@@ -65,7 +65,7 @@ class DatePickerInputElementComponent {
|
|
|
65
65
|
this.errorMessage = computed(() => getInputErrorMessage(this.inputConfig(), this.formGroup()), ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
66
66
|
}
|
|
67
67
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DatePickerInputElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
68
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DatePickerInputElementComponent, isStandalone: true, selector: "lib-date-picker-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" }, providers: [provideFormsDateAdapter()], 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 <lib-date-picker-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n [picker]=\"picker\"\r\n ></lib-date-picker-reactive-input>\r\n\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker>\r\n <button mat-button matDatepickerCancel>Cancel</button>\r\n <button mat-raised-button color=\"primary\" matDatepickerApply>Apply</button>\r\n </mat-datepicker>\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.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.suffixIcon) {\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
|
|
68
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DatePickerInputElementComponent, isStandalone: true, selector: "lib-date-picker-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" }, providers: [provideFormsDateAdapter()], 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 <lib-date-picker-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n [picker]=\"picker\"\r\n ></lib-date-picker-reactive-input>\r\n\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker>\r\n <button mat-button matDatepickerCancel>Cancel</button>\r\n <button mat-raised-button color=\"primary\" matDatepickerApply>Apply</button>\r\n </mat-datepicker>\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.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.suffixIcon) {\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.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1$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: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "component", type: i6.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i6.MatDatepickerCancel, selector: "[matDatepickerCancel], [matDateRangePickerCancel]" }, { kind: "directive", type: i6.MatDatepickerApply, selector: "[matDatepickerApply], [matDateRangePickerApply]" }, { kind: "component", type: TFormInputStatusComponent, selector: "lib-t-form-input-status", inputs: ["inputConfig"] }, { kind: "component", type: DatePickerReactiveInputComponent, selector: "lib-date-picker-reactive-input", inputs: ["picker", "inputConfig"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
69
69
|
}
|
|
70
70
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DatePickerInputElementComponent, decorators: [{
|
|
71
71
|
type: Component,
|
|
@@ -82,4 +82,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
82
82
|
}], 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"] }] } });
|
|
83
83
|
|
|
84
84
|
export { DatePickerInputElementComponent };
|
|
85
|
-
//# sourceMappingURL=ngx-t-forms-date-picker-input-element.component-
|
|
85
|
+
//# sourceMappingURL=ngx-t-forms-date-picker-input-element.component-vUlUuzJ0.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-date-picker-input-element.component-h0S6qZDT.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/core/date-picker-reactive-input/date-picker-reactive-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/core/date-picker-reactive-input/date-picker-reactive-input.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/date-picker-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/date-picker-input-element.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef, inject, input } from '@angular/core';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { NgControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatDatepicker, MatDatepickerInputEvent, MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-auto-complet-reactive-input',\r\n nextId: 0\r\n};\r\n\r\n@Component({\r\n selector: 'lib-date-picker-reactive-input',\r\n imports: [\r\n MatDatepickerModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n ReactiveFormsModule\r\n ],\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n },\r\n providers: [{ provide: MatFormFieldControl, useExisting: DatePickerReactiveInputComponent }],\r\n templateUrl: './date-picker-reactive-input.component.html',\r\n styleUrl: './date-picker-reactive-input.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class DatePickerReactiveInputComponent extends BaseCustomInput<Date> {\r\n readonly picker = input.required<MatDatepicker<unknown>>();\r\n readonly inputConfig = input.required<ITowerStepColumn>();\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 protected changed(event: MatDatepickerInputEvent<unknown, unknown>): void {\r\n this.value = event.value as Date | null;\r\n this.stateChanges.next();\r\n this.onChange(this.value);\r\n }\r\n}\r\n","<input\r\n[required]=\"inputConfig().required\"\r\n[disabled]=\"inputConfig().disabled || inputConfig().readonly\"\r\n[min]=\"inputConfig().min\"\r\n(dateChange)=\"changed($event)\"\r\n[value]=\"value\"\r\n[max]=\"inputConfig().max\" matInput\r\n[matDatepicker]=\"picker()\" />\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { provideFormsDateAdapter } from '../../../../services/core/t-form-localization/forms-native-date-adapter';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\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 { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { DatePickerReactiveInputComponent } from './core/date-picker-reactive-input/date-picker-reactive-input.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Wraps a reactive date-picker control inside a `mat-form-field`. */\r\n@Component({\r\n selector: 'lib-date-picker-input-element',\r\n templateUrl: './date-picker-input-element.component.html',\r\n styleUrl: './date-picker-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n // Material's native adapter, following the consumer's locale, week start, date pattern and clock.\r\n providers: [provideFormsDateAdapter()],\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n MatDatepickerModule,\r\n TFormInputStatusComponent,\r\n DatePickerReactiveInputComponent,\r\n ],\r\n})\r\nexport class DatePickerInputElementComponent {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n readonly reload = output<void>();\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 <lib-date-picker-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n [picker]=\"picker\"\r\n ></lib-date-picker-reactive-input>\r\n\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker>\r\n <button mat-button matDatepickerCancel>Cancel</button>\r\n <button mat-raised-button color=\"primary\" matDatepickerApply>Apply</button>\r\n </mat-datepicker>\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.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.suffixIcon) {\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":["i4"],"mappings":";;;;;;;;;;;;;;;;;;;AASA,MAAM,iBAAiB,GAA0B;AAC/C,IAAA,WAAW,EAAE,iCAAiC;AAC9C,IAAA,MAAM,EAAE;CACT;AAmBK,MAAO,gCAAiC,SAAQ,eAAqB,CAAA;AAIzE,IAAA,WAAA,GAAA;QACE,KAAK,CACH,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAc,EAC9D,MAAM,CAA0B,UAAU,CAAC,EAC3C,iBAAiB,CAClB;AARM,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,4EAA0B;AACjD,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,QAAQ,iFAAoB;IAQ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EAAA,QAAA,EAAA,qgFAAA,EAAA,MAAA,EAAA,CAAA,oJAAA,CAAA,EAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-date-picker-input-element.component-vUlUuzJ0.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/core/date-picker-reactive-input/date-picker-reactive-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/core/date-picker-reactive-input/date-picker-reactive-input.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/date-picker-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/date-picker-input-element.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef, inject, input } from '@angular/core';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { NgControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatDatepicker, MatDatepickerInputEvent, MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-auto-complet-reactive-input',\r\n nextId: 0\r\n};\r\n\r\n@Component({\r\n selector: 'lib-date-picker-reactive-input',\r\n imports: [\r\n MatDatepickerModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n ReactiveFormsModule\r\n ],\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n },\r\n providers: [{ provide: MatFormFieldControl, useExisting: DatePickerReactiveInputComponent }],\r\n templateUrl: './date-picker-reactive-input.component.html',\r\n styleUrl: './date-picker-reactive-input.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class DatePickerReactiveInputComponent extends BaseCustomInput<Date> {\r\n readonly picker = input.required<MatDatepicker<unknown>>();\r\n readonly inputConfig = input.required<ITowerStepColumn>();\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 protected changed(event: MatDatepickerInputEvent<unknown, unknown>): void {\r\n this.value = event.value as Date | null;\r\n this.stateChanges.next();\r\n this.onChange(this.value);\r\n }\r\n}\r\n","<input\r\n[required]=\"inputConfig().required\"\r\n[disabled]=\"inputConfig().disabled || inputConfig().readonly\"\r\n[min]=\"inputConfig().min\"\r\n(dateChange)=\"changed($event)\"\r\n[value]=\"value\"\r\n[max]=\"inputConfig().max\" matInput\r\n[matDatepicker]=\"picker()\" />\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { provideFormsDateAdapter } from '../../../../services/core/t-form-localization/forms-native-date-adapter';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\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 { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { DatePickerReactiveInputComponent } from './core/date-picker-reactive-input/date-picker-reactive-input.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Wraps a reactive date-picker control inside a `mat-form-field`. */\r\n@Component({\r\n selector: 'lib-date-picker-input-element',\r\n templateUrl: './date-picker-input-element.component.html',\r\n styleUrl: './date-picker-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n // Material's native adapter, following the consumer's locale, week start, date pattern and clock.\r\n providers: [provideFormsDateAdapter()],\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n MatDatepickerModule,\r\n TFormInputStatusComponent,\r\n DatePickerReactiveInputComponent,\r\n ],\r\n})\r\nexport class DatePickerInputElementComponent {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n readonly reload = output<void>();\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 <lib-date-picker-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n [picker]=\"picker\"\r\n ></lib-date-picker-reactive-input>\r\n\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker>\r\n <button mat-button matDatepickerCancel>Cancel</button>\r\n <button mat-raised-button color=\"primary\" matDatepickerApply>Apply</button>\r\n </mat-datepicker>\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.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.suffixIcon) {\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":["i2","i4"],"mappings":";;;;;;;;;;;;;;;;;;;AASA,MAAM,iBAAiB,GAA0B;AAC/C,IAAA,WAAW,EAAE,iCAAiC;AAC9C,IAAA,MAAM,EAAE;CACT;AAmBK,MAAO,gCAAiC,SAAQ,eAAqB,CAAA;AAIzE,IAAA,WAAA,GAAA;QACE,KAAK,CACH,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAc,EAC9D,MAAM,CAA0B,UAAU,CAAC,EAC3C,iBAAiB,CAClB;AARM,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,4EAA0B;AACjD,QAAA,IAAA,CAAA,WAAW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B,yBAAyB;wBACzB,gCAAgC;AACjC,qBAAA,EAAA,QAAA,EAAA,qgFAAA,EAAA,MAAA,EAAA,CAAA,oJAAA,CAAA,EAAA;;;;;"}
|
|
@@ -2,18 +2,18 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { inject, ElementRef, input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, output } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { NgControl, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import { p as provideFormsDateAdapter } from './ngx-t-forms-forms-native-date-adapter-
|
|
5
|
+
import { p as provideFormsDateAdapter } from './ngx-t-forms-forms-native-date-adapter-h6fClNMS.mjs';
|
|
6
6
|
import * as i6 from '@angular/material/datepicker';
|
|
7
7
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
8
8
|
import * as i2 from '@angular/material/form-field';
|
|
9
9
|
import { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';
|
|
10
10
|
import * as i3 from '@angular/material/icon';
|
|
11
11
|
import { MatIconModule } from '@angular/material/icon';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i1$1 from '@angular/material/button';
|
|
13
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
14
|
import * as i5 from '@angular/material/tooltip';
|
|
15
15
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
|
-
import { B as BaseCustomInput,
|
|
16
|
+
import { B as BaseCustomInput, af as resolveDateRangeControlNames, a9 as getInputErrorMessage, aa as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-C1kZpYIM.mjs';
|
|
17
17
|
import { MatInputModule } from '@angular/material/input';
|
|
18
18
|
|
|
19
19
|
const customInputConfig = {
|
|
@@ -146,7 +146,7 @@ class DateRangePickerInputElementComponent {
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DateRangePickerInputElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
149
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DateRangePickerInputElementComponent, isStandalone: true, selector: "lib-date-range-picker-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" }, providers: [provideFormsDateAdapter()], ngImport: i0, template: "<form [formGroup]=\"formGroup()\">\n @if (inputConfig(); as inputConfig) {\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\n <mat-label>\n {{ inputConfig.label }}\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\n </mat-label>\n\n <lib-date-range-picker-reactive-input\n [inputConfig]=\"inputConfig\"\n [required]=\"inputConfig.required\"\n [formControlName]=\"endControlName()\"\n ></lib-date-range-picker-reactive-input>\n\n <!--\n Both endpoints render unconditionally, and their control names come from\n `startControlName()` / `endControlName()` \u2014 never from the raw, optional\n `inputConfig.startDateControl` / `.endDateControl`. These inputs used to sit\n behind `@if (inputConfig.startDateControl)` guards, so a descriptor that\n omitted either key built a `mat-date-range-input` with a missing endpoint\n and Material threw \"must contain a matStartDate input\" from\n `ngAfterContentInit`. The resolved names carry a `startDate` / `endDate`\n fallback (see dateRangeControlNames.ts) that the control generator applies\n too, so the control each input binds to always exists.\n -->\n <mat-date-range-input [required]=\"inputConfig.required\" [formGroup]=\"formGroup()\" [rangePicker]=\"picker\">\n <input\n matStartDate\n [disabled]=\"!!(inputConfig.disabled ?? inputConfig.readonly)\"\n [formControlName]=\"startControlName()\"\n [min]=\"inputConfig.startMinDate\"\n [max]=\"inputConfig.startMaxDate\"\n [value]=\"formGroup().controls[startControlName()]?.value\"\n (dateChange)=\"dateChanged($event, startControlName())\"\n placeholder=\"Start date\"\n />\n <input\n matEndDate\n [disabled]=\"!!(inputConfig.disabled ?? inputConfig.readonly)\"\n [formControlName]=\"endControlName()\"\n [value]=\"formGroup().controls[endControlName()]?.value\"\n placeholder=\"End date\"\n [min]=\"inputConfig.endMinDate\"\n [max]=\"inputConfig.endMaxDate\"\n (dateChange)=\"dateChanged($event, endControlName())\"\n />\n </mat-date-range-input>\n\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-date-range-picker #picker>\n <mat-datepicker-actions>\n <button mat-button matDatepickerCancel>Cancel</button>\n <button mat-raised-button color=\"primary\" matDatepickerApply>Apply</button>\n </mat-datepicker-actions>\n </mat-date-range-picker>\n\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\n <mat-hint [matTooltip]=\"inputConfig.hintLabel || ''\" class=\"inputHint\">\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\n </mat-hint>\n }\n\n @if (!!errorMessage()) {\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\n }\n\n @if (inputConfig.canReload?.canReload) {\n <button\n mat-icon-button\n style=\"margin-right: 4px;\"\n matTooltip=\"Click to refresh this field.\"\n class=\"input-sync-button\"\n (click)=\"inputConfig.canReload.emit()\"\n matSuffix\n >\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\n </button>\n }\n\n @if (inputConfig.prefixIcon) {\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\n }\n\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\n }\n\n @if (inputConfig.prefixText) {\n <span matPrefix style=\"padding: 0 12px;\">{{ inputConfig.prefixText }}</span>\n }\n @if (inputConfig.suffixText) {\n <span matSuffix style=\"padding: 0 12px;\">{{ inputConfig.suffixText }}</span>\n }\n\n @if (inputConfig.maxLength && formGroup()) {\n <mat-hint>\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\n </mat-hint>\n }\n </mat-form-field>\n }\n</form>\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.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.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:
|
|
149
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DateRangePickerInputElementComponent, isStandalone: true, selector: "lib-date-range-picker-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" }, providers: [provideFormsDateAdapter()], ngImport: i0, template: "<form [formGroup]=\"formGroup()\">\n @if (inputConfig(); as inputConfig) {\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\n <mat-label>\n {{ inputConfig.label }}\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\n </mat-label>\n\n <lib-date-range-picker-reactive-input\n [inputConfig]=\"inputConfig\"\n [required]=\"inputConfig.required\"\n [formControlName]=\"endControlName()\"\n ></lib-date-range-picker-reactive-input>\n\n <!--\n Both endpoints render unconditionally, and their control names come from\n `startControlName()` / `endControlName()` \u2014 never from the raw, optional\n `inputConfig.startDateControl` / `.endDateControl`. These inputs used to sit\n behind `@if (inputConfig.startDateControl)` guards, so a descriptor that\n omitted either key built a `mat-date-range-input` with a missing endpoint\n and Material threw \"must contain a matStartDate input\" from\n `ngAfterContentInit`. The resolved names carry a `startDate` / `endDate`\n fallback (see dateRangeControlNames.ts) that the control generator applies\n too, so the control each input binds to always exists.\n -->\n <mat-date-range-input [required]=\"inputConfig.required\" [formGroup]=\"formGroup()\" [rangePicker]=\"picker\">\n <input\n matStartDate\n [disabled]=\"!!(inputConfig.disabled ?? inputConfig.readonly)\"\n [formControlName]=\"startControlName()\"\n [min]=\"inputConfig.startMinDate\"\n [max]=\"inputConfig.startMaxDate\"\n [value]=\"formGroup().controls[startControlName()]?.value\"\n (dateChange)=\"dateChanged($event, startControlName())\"\n placeholder=\"Start date\"\n />\n <input\n matEndDate\n [disabled]=\"!!(inputConfig.disabled ?? inputConfig.readonly)\"\n [formControlName]=\"endControlName()\"\n [value]=\"formGroup().controls[endControlName()]?.value\"\n placeholder=\"End date\"\n [min]=\"inputConfig.endMinDate\"\n [max]=\"inputConfig.endMaxDate\"\n (dateChange)=\"dateChanged($event, endControlName())\"\n />\n </mat-date-range-input>\n\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-date-range-picker #picker>\n <mat-datepicker-actions>\n <button mat-button matDatepickerCancel>Cancel</button>\n <button mat-raised-button color=\"primary\" matDatepickerApply>Apply</button>\n </mat-datepicker-actions>\n </mat-date-range-picker>\n\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\n <mat-hint [matTooltip]=\"inputConfig.hintLabel || ''\" class=\"inputHint\">\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\n </mat-hint>\n }\n\n @if (!!errorMessage()) {\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\n }\n\n @if (inputConfig.canReload?.canReload) {\n <button\n mat-icon-button\n style=\"margin-right: 4px;\"\n matTooltip=\"Click to refresh this field.\"\n class=\"input-sync-button\"\n (click)=\"inputConfig.canReload.emit()\"\n matSuffix\n >\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\n </button>\n }\n\n @if (inputConfig.prefixIcon) {\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\n }\n\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\n }\n\n @if (inputConfig.prefixText) {\n <span matPrefix style=\"padding: 0 12px;\">{{ inputConfig.prefixText }}</span>\n }\n @if (inputConfig.suffixText) {\n <span matSuffix style=\"padding: 0 12px;\">{{ inputConfig.suffixText }}</span>\n }\n\n @if (inputConfig.maxLength && formGroup()) {\n <mat-hint>\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\n </mat-hint>\n }\n </mat-form-field>\n }\n</form>\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.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.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.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1$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: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i6.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i6.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i6.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i6.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "component", type: i6.MatDatepickerActions, selector: "mat-datepicker-actions, mat-date-range-picker-actions" }, { kind: "directive", type: i6.MatDatepickerCancel, selector: "[matDatepickerCancel], [matDateRangePickerCancel]" }, { kind: "directive", type: i6.MatDatepickerApply, selector: "[matDatepickerApply], [matDateRangePickerApply]" }, { kind: "component", type: TFormInputStatusComponent, selector: "lib-t-form-input-status", inputs: ["inputConfig"] }, { kind: "component", type: DateRangePickerReactiveInputComponent, selector: "lib-date-range-picker-reactive-input", inputs: ["inputConfig"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
150
150
|
}
|
|
151
151
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DateRangePickerInputElementComponent, decorators: [{
|
|
152
152
|
type: Component,
|
|
@@ -163,4 +163,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
163
163
|
}], 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"] }] } });
|
|
164
164
|
|
|
165
165
|
export { DateRangePickerInputElementComponent };
|
|
166
|
-
//# sourceMappingURL=ngx-t-forms-date-range-picker-input-element.component-
|
|
166
|
+
//# sourceMappingURL=ngx-t-forms-date-range-picker-input-element.component-YVE_s-7Y.mjs.map
|