ngx-t-forms 2.0.37 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-D_l5sbNh.mjs → ngx-t-forms-auto-complete-input-element.component-FhUHTsUF.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-D_l5sbNh.mjs.map → ngx-t-forms-auto-complete-input-element.component-FhUHTsUF.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-fJIsRm0v.mjs → ngx-t-forms-basic-input-input-element.component-BJKe9wIA.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-fJIsRm0v.mjs.map → ngx-t-forms-basic-input-input-element.component-BJKe9wIA.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-FQLTI7CX.mjs +643 -0
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-FQLTI7CX.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-L1kPy15K.mjs → ngx-t-forms-chip-options-creator-editor.component-CJtbprXS.mjs} +4 -4
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-CJtbprXS.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CU6Cp-oK.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-CU6R5h-x.mjs} +4 -4
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CU6R5h-x.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-data-source-picker.component-C8MBbnfz.mjs +261 -0
- package/fesm2022/ngx-t-forms-data-source-picker.component-C8MBbnfz.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-DsjcLQ5A.mjs → ngx-t-forms-date-picker-input-element.component-Dux6uy66.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-DsjcLQ5A.mjs.map → ngx-t-forms-date-picker-input-element.component-Dux6uy66.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-SMWrTm5X.mjs +157 -0
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-SMWrTm5X.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-uGM93dvc.mjs +373 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-uGM93dvc.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-document-picker.component-DIqaaBSl.mjs +1259 -0
- package/fesm2022/ngx-t-forms-document-picker.component-DIqaaBSl.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-editor-input-element.component-CIELjDty.mjs +417 -0
- package/fesm2022/ngx-t-forms-editor-input-element.component-CIELjDty.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-editor-js-input.component-C1dI_7rU.mjs +553 -0
- package/fesm2022/ngx-t-forms-editor-js-input.component-C1dI_7rU.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-_RBYRgn9.mjs → ngx-t-forms-file-upload-input-element.component-CQsKz87N.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-_RBYRgn9.mjs.map → ngx-t-forms-file-upload-input-element.component-CQsKz87N.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-input-selector.component-Dj0jvBdm.mjs +86 -0
- package/fesm2022/ngx-t-forms-form-input-selector.component-Dj0jvBdm.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-form-json-view.component-D9rU9vxT.mjs → ngx-t-forms-form-json-view.component-DzJKFl4c.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-D9rU9vxT.mjs.map → ngx-t-forms-form-json-view.component-DzJKFl4c.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs +179 -0
- package/fesm2022/ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-CqCL3Bnc.mjs → ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-CqCL3Bnc.mjs.map → ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-wmRDJU4P.mjs → ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs} +12 -12
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-wmRDJU4P.mjs.map → ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-geo-location.component-CMbBSXe0.mjs → ngx-t-forms-geo-location.component-Bj_qIEqi.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-geo-location.component-CMbBSXe0.mjs.map → ngx-t-forms-geo-location.component-Bj_qIEqi.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-header-template-editor.component-DLldVmcN.mjs +129 -0
- package/fesm2022/ngx-t-forms-header-template-editor.component-DLldVmcN.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-Cbq8OYk7.mjs → ngx-t-forms-image-capture-input-element.component-lwp3IcDt.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-Cbq8OYk7.mjs.map → ngx-t-forms-image-capture-input-element.component-lwp3IcDt.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-index-CPNvE4PP.mjs → ngx-t-forms-index-C8NtLE16.mjs} +2 -2
- package/fesm2022/ngx-t-forms-index-C8NtLE16.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-custom.component-uNVdF9aA.mjs → ngx-t-forms-input-custom.component-DiciFhSS.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-input-custom.component-uNVdF9aA.mjs.map → ngx-t-forms-input-custom.component-DiciFhSS.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-input-editor.component-D12hrHOc.mjs +190 -0
- package/fesm2022/ngx-t-forms-input-editor.component-D12hrHOc.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-D0SGS9xQ.mjs → ngx-t-forms-map-mat-options-keys-C2JpMTEc.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-D0SGS9xQ.mjs.map → ngx-t-forms-map-mat-options-keys-C2JpMTEc.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-C1Qrze7K.mjs +167 -0
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-C1Qrze7K.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs → ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs} +3 -3
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs → ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs} +3 -3
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-CxF6Ljjf.mjs → ngx-t-forms-missing-form-configs.component-BaTR_jzc.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-CxF6Ljjf.mjs.map → ngx-t-forms-missing-form-configs.component-BaTR_jzc.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-BqT5Z8SM.mjs → ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-BqT5Z8SM.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-99DpVSy7.mjs → ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-99DpVSy7.mjs.map → ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs +447 -0
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs → ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs.map → ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs +905 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-DQ_h-jPF.mjs → ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs} +2188 -249
- package/fesm2022/ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-paginated-selection-table-DHwojPhn.mjs → ngx-t-forms-paginated-selection-table-pYY2sWAb.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-paginated-selection-table-DHwojPhn.mjs.map → ngx-t-forms-paginated-selection-table-pYY2sWAb.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs +79 -0
- package/fesm2022/ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs +748 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-record-list-manager.component-CtCOIpai.mjs +446 -0
- package/fesm2022/ngx-t-forms-record-list-manager.component-CtCOIpai.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-D9wIdOhg.mjs +272 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-D9wIdOhg.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-D3sa7sNg.mjs → ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs} +39 -8
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-search-field.component-mR4Kk12C.mjs +38 -0
- package/fesm2022/ngx-t-forms-search-field.component-mR4Kk12C.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-section-report.component-D6jakGa5.mjs → ngx-t-forms-section-report.component-U9uQ_Ow9.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-section-report.component-D6jakGa5.mjs.map → ngx-t-forms-section-report.component-U9uQ_Ow9.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-select-input-element.component-CwqIck0h.mjs → ngx-t-forms-select-input-element.component-CxYTmuvV.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-select-input-element.component-CwqIck0h.mjs.map → ngx-t-forms-select-input-element.component-CxYTmuvV.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs +169 -0
- package/fesm2022/ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs +263 -0
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-D4dEi8Vs.mjs → ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-D4dEi8Vs.mjs.map → ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-BZiTFB0j.mjs → ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-BZiTFB0j.mjs.map → ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs +173 -0
- package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-validators-config.component-EM7RSWIz.mjs +574 -0
- package/fesm2022/ngx-t-forms-validators-config.component-EM7RSWIz.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-DD6Fhx06.mjs → ngx-t-forms-workflow-adjudication.component-C1Em-g9e.mjs} +17 -17
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-C1Em-g9e.mjs.map +1 -0
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/package.json +2 -2
- package/styles/_editor-mixins.scss +117 -117
- package/styles/_signature-pad.scss +26 -26
- package/styles/_tokens.scss +148 -148
- package/types/ngx-t-forms.d.ts +14 -2
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-B8Do3h4B.mjs +0 -643
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-B8Do3h4B.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-L1kPy15K.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CU6Cp-oK.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-data-source-picker.component-r7OGAsxo.mjs +0 -261
- package/fesm2022/ngx-t-forms-data-source-picker.component-r7OGAsxo.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-B8V7IpoK.mjs +0 -156
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-B8V7IpoK.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-hKJqVYUY.mjs +0 -373
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-hKJqVYUY.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-picker.component-f-hz6Vef.mjs +0 -704
- package/fesm2022/ngx-t-forms-document-picker.component-f-hz6Vef.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-editor-input-element.component-D38U94oj.mjs +0 -294
- package/fesm2022/ngx-t-forms-editor-input-element.component-D38U94oj.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-editor-js-input.component-D_Jq7sfY.mjs +0 -240
- package/fesm2022/ngx-t-forms-editor-js-input.component-D_Jq7sfY.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-input-selector.component-CUwK3DqG.mjs +0 -86
- package/fesm2022/ngx-t-forms-form-input-selector.component-CUwK3DqG.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs +0 -179
- package/fesm2022/ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-index-CPNvE4PP.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-editor.component-BWoKhlI3.mjs +0 -190
- package/fesm2022/ngx-t-forms-input-editor.component-BWoKhlI3.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-Cu-KiAeY.mjs +0 -66
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-Cu-KiAeY.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BT-dM_5C.mjs +0 -447
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BT-dM_5C.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-DXAh2Mbm.mjs +0 -905
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-DXAh2Mbm.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-DQ_h-jPF.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-payload-template-editor.component-CAXdFu4E.mjs +0 -203
- package/fesm2022/ngx-t-forms-payload-template-editor.component-CAXdFu4E.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-pipeline-generator.component-BJQ-KnmU.mjs +0 -748
- package/fesm2022/ngx-t-forms-pipeline-generator.component-BJQ-KnmU.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-record-list-manager.component-BoD3S_7u.mjs +0 -358
- package/fesm2022/ngx-t-forms-record-list-manager.component-BoD3S_7u.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-C-E3fQu6.mjs +0 -272
- package/fesm2022/ngx-t-forms-required-inputs.component-C-E3fQu6.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-D3sa7sNg.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs +0 -38
- package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-selection-options-editor.component-Coj9gnrq.mjs +0 -169
- package/fesm2022/ngx-t-forms-selection-options-editor.component-Coj9gnrq.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-DqFMP1rZ.mjs +0 -204
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-DqFMP1rZ.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-validators-config.component-B3K9nLxx.mjs +0 -574
- package/fesm2022/ngx-t-forms-validators-config.component-B3K9nLxx.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-DD6Fhx06.mjs.map +0 -1
|
@@ -6,14 +6,14 @@ import * as i2$1 from '@angular/material/form-field';
|
|
|
6
6
|
import { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';
|
|
7
7
|
import * as i3 from '@angular/material/icon';
|
|
8
8
|
import { MatIconModule } from '@angular/material/icon';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i2$2 from '@angular/material/button';
|
|
10
10
|
import { MatButtonModule } from '@angular/material/button';
|
|
11
11
|
import * as i5$1 from '@angular/material/tooltip';
|
|
12
12
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
13
13
|
import * as i5 from '@angular/material/autocomplete';
|
|
14
14
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
15
15
|
import { MatOptionModule } from '@angular/material/core';
|
|
16
|
-
import { B as BaseCustomInput, q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-
|
|
16
|
+
import { B as BaseCustomInput, q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs';
|
|
17
17
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
18
18
|
import * as i2 from '@angular/material/input';
|
|
19
19
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -83,7 +83,7 @@ class AutoCompleteInputElementComponent {
|
|
|
83
83
|
this.options = computed(() => this.inputConfig().matOptions?.options ?? [], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
84
84
|
}
|
|
85
85
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: AutoCompleteInputElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
86
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: AutoCompleteInputElementComponent, isStandalone: true, selector: "lib-auto-complete-input-element", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { reload: "reload" }, ngImport: i0, template: "<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-auto-complet-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n [auto]=\"auto\"\r\n ></lib-auto-complet-reactive-input>\r\n\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n @for (option of options(); track option.id) {\r\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\r\n }\r\n </mat-autocomplete>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint [matTooltip]=\"inputConfig.hintLabel || ''\" class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (!!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 && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n", 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$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.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:
|
|
86
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: AutoCompleteInputElementComponent, isStandalone: true, selector: "lib-auto-complete-input-element", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { reload: "reload" }, ngImport: i0, template: "<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-auto-complet-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n [auto]=\"auto\"\r\n ></lib-auto-complet-reactive-input>\r\n\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n @for (option of options(); track option.id) {\r\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\r\n }\r\n </mat-autocomplete>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint [matTooltip]=\"inputConfig.hintLabel || ''\" class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (!!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 && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n", 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$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.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: i2$2.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$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i8.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "component", type: AutoCompletReactiveInputComponent, selector: "lib-auto-complet-reactive-input", inputs: ["auto", "inputConfig"] }, { kind: "component", type: TFormInputStatusComponent, selector: "lib-t-form-input-status", inputs: ["inputConfig"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
87
87
|
}
|
|
88
88
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: AutoCompleteInputElementComponent, decorators: [{
|
|
89
89
|
type: Component,
|
|
@@ -101,4 +101,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
101
101
|
}], 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"] }] } });
|
|
102
102
|
|
|
103
103
|
export { AutoCompleteInputElementComponent };
|
|
104
|
-
//# sourceMappingURL=ngx-t-forms-auto-complete-input-element.component-
|
|
104
|
+
//# sourceMappingURL=ngx-t-forms-auto-complete-input-element.component-FhUHTsUF.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-auto-complete-input-element.component-D_l5sbNh.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/auto-complete-input-element/core/auto-complet-reactive-input/auto-complet-reactive-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/auto-complete-input-element/core/auto-complet-reactive-input/auto-complet-reactive-input.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/auto-complete-input-element/auto-complete-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/auto-complete-input-element/auto-complete-input-element.component.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n OnInit,\r\n ViewEncapsulation,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { NgControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatAutocomplete, MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { debounceTime, Subject } from 'rxjs';\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-auto-complet-reactive-input',\r\n imports: [\r\n ReactiveFormsModule,\r\n MatAutocompleteModule,\r\n MatInputModule,\r\n ],\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n },\r\n providers: [{ provide: MatFormFieldControl, useExisting: AutoCompletReactiveInputComponent }],\r\n templateUrl: './auto-complet-reactive-input.component.html',\r\n styleUrl: './auto-complet-reactive-input.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n})\r\nexport class AutoCompletReactiveInputComponent extends BaseCustomInput<string | number | Date> implements OnInit {\r\n override get empty(): boolean {\r\n return !this.value;\r\n }\r\n override get shouldLabelFloat(): boolean {\r\n return true;\r\n }\r\n\r\n readonly auto = input.required<MatAutocomplete>();\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n readonly #destroyRef = inject(DestroyRef);\r\n readonly #debounceTime = 300;\r\n readonly #valueSubject = new Subject<Event>();\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { self: true, optional: true })!,\r\n inject(ElementRef),\r\n customInputConfig,\r\n );\r\n }\r\n\r\n ngOnInit(): void {\r\n this.#valueSubject\r\n .pipe(\r\n debounceTime(this.#debounceTime),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe(event => {\r\n const target = event.target as HTMLInputElement | null;\r\n this.value = target?.value ?? '';\r\n this.stateChanges.next();\r\n this.onChange(this.value);\r\n });\r\n }\r\n\r\n protected onInputChange($event: Event): void {\r\n this.#valueSubject.next($event);\r\n }\r\n}\r\n","<input [readonly]=\"inputConfig().readonly || inputConfig().disabled\" [pattern]=\"inputConfig().pattern || ''\"\r\n [required]=\"!!inputConfig().required\" [attr.maxlength]=\"inputConfig().maxLength\"\r\n [attr.minlength]=\"inputConfig().minLength\"\r\n [type]=\"inputConfig().type || 'text'\"\r\n (input)=\"onInputChange($event)\"\r\n [value]=\"value\"\r\n\r\n [min]=\"inputConfig().min\" [max]=\"inputConfig().max\" autocomplete=\"on\"\r\n [matAutocomplete]=\"auto()\"\r\n matInput />\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatOptionModule } from '@angular/material/core';\r\nimport type { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { AutoCompletReactiveInputComponent } from './core/auto-complet-reactive-input/auto-complet-reactive-input.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Wraps a reactive auto-complete control inside a `mat-form-field`. */\r\n@Component({\r\n selector: 'lib-auto-complete-input-element',\r\n templateUrl: './auto-complete-input-element.component.html',\r\n styleUrl: './auto-complete-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n MatAutocompleteModule,\r\n MatOptionModule,\r\n AutoCompletReactiveInputComponent,\r\n TFormInputStatusComponent,\r\n ],\r\n})\r\nexport class AutoCompleteInputElementComponent {\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 // Internal `any[]` mirrors the legacy getter shape; the upstream\r\n // `matOptions.options` is a (FormInputBasicOptionInterface | DynamicObjectInterface)[]\r\n // union that resolves to `{ id; value; label }` at runtime. Phase 4 will tighten.\r\n protected readonly options = computed<any[]>(\r\n () => this.inputConfig().matOptions?.options ?? [],\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-auto-complet-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n [auto]=\"auto\"\r\n ></lib-auto-complet-reactive-input>\r\n\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n @for (option of options(); track option.id) {\r\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\r\n }\r\n </mat-autocomplete>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint [matTooltip]=\"inputConfig.hintLabel || ''\" class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (!!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 && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n"],"names":["i4","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,iBAAiB,GAA0B;AAC/C,IAAA,WAAW,EAAE,iCAAiC;AAC9C,IAAA,MAAM,EAAE,CAAC;CACV;AAmBK,MAAO,iCAAkC,SAAQ,eAAuC,CAAA;AAC5F,IAAA,IAAa,KAAK,GAAA;AAChB,QAAA,OAAO,CAAC,IAAI,CAAC,KAAK;IACpB;AACA,IAAA,IAAa,gBAAgB,GAAA;AAC3B,QAAA,OAAO,IA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AA,EAAA,OAAA,EAAA,8BAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,QAAA,EAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,IAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACrB,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACf,iCAAiC,6GACjC,yBAAyB,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAGhB,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAjB7C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iCAAiC,EAAA,eAAA,EAG1B,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,mBAAmB;wBACnB,kBAAkB;wBAClB,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,qBAAqB;wBACrB,eAAe;wBACf,iCAAiC;wBACjC,yBAAyB;AAC1B,qBAAA,EAAA,QAAA,EAAA,yhFAAA,EAAA,MAAA,EAAA,CAAA,oJAAA,CAAA,EAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-auto-complete-input-element.component-FhUHTsUF.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/auto-complete-input-element/core/auto-complet-reactive-input/auto-complet-reactive-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/auto-complete-input-element/core/auto-complet-reactive-input/auto-complet-reactive-input.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/auto-complete-input-element/auto-complete-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/auto-complete-input-element/auto-complete-input-element.component.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n OnInit,\r\n ViewEncapsulation,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { NgControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatAutocomplete, MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { debounceTime, Subject } from 'rxjs';\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-auto-complet-reactive-input',\r\n imports: [\r\n ReactiveFormsModule,\r\n MatAutocompleteModule,\r\n MatInputModule,\r\n ],\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n },\r\n providers: [{ provide: MatFormFieldControl, useExisting: AutoCompletReactiveInputComponent }],\r\n templateUrl: './auto-complet-reactive-input.component.html',\r\n styleUrl: './auto-complet-reactive-input.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n})\r\nexport class AutoCompletReactiveInputComponent extends BaseCustomInput<string | number | Date> implements OnInit {\r\n override get empty(): boolean {\r\n return !this.value;\r\n }\r\n override get shouldLabelFloat(): boolean {\r\n return true;\r\n }\r\n\r\n readonly auto = input.required<MatAutocomplete>();\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n readonly #destroyRef = inject(DestroyRef);\r\n readonly #debounceTime = 300;\r\n readonly #valueSubject = new Subject<Event>();\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { self: true, optional: true })!,\r\n inject(ElementRef),\r\n customInputConfig,\r\n );\r\n }\r\n\r\n ngOnInit(): void {\r\n this.#valueSubject\r\n .pipe(\r\n debounceTime(this.#debounceTime),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe(event => {\r\n const target = event.target as HTMLInputElement | null;\r\n this.value = target?.value ?? '';\r\n this.stateChanges.next();\r\n this.onChange(this.value);\r\n });\r\n }\r\n\r\n protected onInputChange($event: Event): void {\r\n this.#valueSubject.next($event);\r\n }\r\n}\r\n","<input [readonly]=\"inputConfig().readonly || inputConfig().disabled\" [pattern]=\"inputConfig().pattern || ''\"\r\n [required]=\"!!inputConfig().required\" [attr.maxlength]=\"inputConfig().maxLength\"\r\n [attr.minlength]=\"inputConfig().minLength\"\r\n [type]=\"inputConfig().type || 'text'\"\r\n (input)=\"onInputChange($event)\"\r\n [value]=\"value\"\r\n\r\n [min]=\"inputConfig().min\" [max]=\"inputConfig().max\" autocomplete=\"on\"\r\n [matAutocomplete]=\"auto()\"\r\n matInput />\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatOptionModule } from '@angular/material/core';\r\nimport type { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { AutoCompletReactiveInputComponent } from './core/auto-complet-reactive-input/auto-complet-reactive-input.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Wraps a reactive auto-complete control inside a `mat-form-field`. */\r\n@Component({\r\n selector: 'lib-auto-complete-input-element',\r\n templateUrl: './auto-complete-input-element.component.html',\r\n styleUrl: './auto-complete-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n MatAutocompleteModule,\r\n MatOptionModule,\r\n AutoCompletReactiveInputComponent,\r\n TFormInputStatusComponent,\r\n ],\r\n})\r\nexport class AutoCompleteInputElementComponent {\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 // Internal `any[]` mirrors the legacy getter shape; the upstream\r\n // `matOptions.options` is a (FormInputBasicOptionInterface | DynamicObjectInterface)[]\r\n // union that resolves to `{ id; value; label }` at runtime. Phase 4 will tighten.\r\n protected readonly options = computed<any[]>(\r\n () => this.inputConfig().matOptions?.options ?? [],\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-auto-complet-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n [auto]=\"auto\"\r\n ></lib-auto-complet-reactive-input>\r\n\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n @for (option of options(); track option.id) {\r\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\r\n }\r\n </mat-autocomplete>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint [matTooltip]=\"inputConfig.hintLabel || ''\" class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (!!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 && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n"],"names":["i4","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,iBAAiB,GAA0B;AAC/C,IAAA,WAAW,EAAE,iCAAiC;AAC9C,IAAA,MAAM,EAAE,CAA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|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, output, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import * as i1
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
4
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import * as i2 from '@angular/material/form-field';
|
|
6
6
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
7
7
|
import { MatInputModule } from '@angular/material/input';
|
|
8
8
|
import * as i3 from '@angular/material/icon';
|
|
9
9
|
import { MatIconModule } from '@angular/material/icon';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i2$1 from '@angular/material/button';
|
|
11
11
|
import { MatButtonModule } from '@angular/material/button';
|
|
12
12
|
import * as i5 from '@angular/material/tooltip';
|
|
13
13
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
14
|
-
import { q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-
|
|
14
|
+
import { q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs';
|
|
15
15
|
import { InputPipeTypes } from 'ngx-t-forms-types';
|
|
16
|
-
import { InputCustomComponent } from './ngx-t-forms-input-custom.component-
|
|
16
|
+
import { InputCustomComponent } from './ngx-t-forms-input-custom.component-DiciFhSS.mjs';
|
|
17
17
|
|
|
18
18
|
class BasicInputInputElementComponent {
|
|
19
19
|
constructor() {
|
|
@@ -65,7 +65,7 @@ class BasicInputInputElementComponent {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: BasicInputInputElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
68
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: BasicInputInputElementComponent, isStandalone: true, selector: "lib-basic-input-input-element", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { reload: "reload" }, ngImport: i0, template: "<ng-container [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as classInput) {\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 @if(currencyPrefix()){\r\n <span style=\"color: var(--mat-sys-primary);padding-right: 4px;\" matTextPrefix>{{currencyPrefix()}} </span>\r\n }\r\n\r\n <lib-input-custom [inputConfig]=\"inputConfig()\" [required]=\"inputConfig().required\"\r\n [formControlName]=\"inputConfig().id\"></lib-input-custom>\r\n\r\n @if(errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{errorMessage()}}</mat-error>\r\n }\r\n <!-- [type]=\"this.inputConfig.showPassword ? 'text' : this.inputConfig.type||'text'\"-->\r\n <!-- @if(classInput.canRefresh){\r\n <button\r\n (click)=\"classInput.refresh()\"\r\n style=\" min-width: 1%;\"\r\n [matTooltip]=\"'Click to refresh this field. This will update any calculated values, fetch latest data from services, or reload available options'\"\r\n color=\"primary\" matSuffix mat-icon-button>\r\n <mat-icon>\r\n sync\r\n </mat-icon>\r\n </button>\r\n } -->\r\n\r\n\r\n @if(inputConfig().hintLabel || classInput.temporaryHint ){\r\n <mat-hint class=\"inputHint\">\r\n {{ classInput.temporaryHint || inputConfig().hintLabel}}\r\n </mat-hint>\r\n }\r\n @if(inputConfig().canReload?.canReload){\r\n <button 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()\" matSuffix>\r\n <mat-icon\r\n style=\"color:var(--mat-sys-primary)\"\r\n >sync</mat-icon>\r\n </button>\r\n }\r\n\r\n\r\n <!-- Prefix Icon -->\r\n @if (inputConfig().prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig().prefixIcon }}</mat-icon>\r\n }\r\n\r\n <!-- Suffix Icon or Password Visibility Toggle -->\r\n <!-- <ng-container *ngIf=\"inputConfig.suffixIcon\">\r\n <mat-icon *ngIf=\"inputConfig.id !== 'password'\" matSuffix>{{ inputConfig.suffixIcon\r\n }}</mat-icon>\r\n <button *ngIf=\"inputConfig.id === 'password'\" (click)=\"classInput.togglePasswordVisibility()\"\r\n mat-icon-button matSuffix>\r\n <mat-icon>{{ classInput.showPassword ? 'remove_red_eye' : 'eye_off' }}</mat-icon>\r\n </button>\r\n </ng-container> -->\r\n\r\n <!-- Prefix & Suffix Text -->\r\n @if (inputConfig().prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig().prefixText }}</span>\r\n }\r\n @if (inputConfig().suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig().suffixText }}</span>\r\n }\r\n\r\n <!-- Character Count Hint -->\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\r\n <!-- Password Strength Hint -->\r\n @if (inputConfig().type === 'password') {\r\n <mat-hint [style.color]=\"passwordStrengthColor(inputConfig().id)\"\r\n matTooltip=\"The password should be at least 8 characters long. Have at least one uppercase letter, one lowercase, one digit, one special character.\"\r\n align=\"end\">\r\n {{ checkPasswordStrength(inputConfig().id) }} password\r\n </mat-hint>\r\n }\r\n <!-- @if(inputConfig?.canReload){\r\n <mat-hint align=\"end\">\r\n\r\n <button click=\" canReload.emit()\" style=\" height: 28px;\r\n width: 28px;\r\n padding: 0px;\r\n font-size: 1em;\" [matTooltip]=\"'Reload ' + inputConfig.label +' resources'\" mat-icon-button>\r\n <mat-icon>\r\n sync\r\n </mat-icon>\r\n\r\n </button>\r\n </mat-hint>\r\n\r\n\r\n } -->\r\n </mat-form-field>\r\n }\r\n\r\n\r\n\r\n\r\n</ng-container>\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: 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: MatInputModule }, { 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:
|
|
68
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: BasicInputInputElementComponent, isStandalone: true, selector: "lib-basic-input-input-element", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { reload: "reload" }, ngImport: i0, template: "<ng-container [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as classInput) {\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 @if(currencyPrefix()){\r\n <span style=\"color: var(--mat-sys-primary);padding-right: 4px;\" matTextPrefix>{{currencyPrefix()}} </span>\r\n }\r\n\r\n <lib-input-custom [inputConfig]=\"inputConfig()\" [required]=\"inputConfig().required\"\r\n [formControlName]=\"inputConfig().id\"></lib-input-custom>\r\n\r\n @if(errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{errorMessage()}}</mat-error>\r\n }\r\n <!-- [type]=\"this.inputConfig.showPassword ? 'text' : this.inputConfig.type||'text'\"-->\r\n <!-- @if(classInput.canRefresh){\r\n <button\r\n (click)=\"classInput.refresh()\"\r\n style=\" min-width: 1%;\"\r\n [matTooltip]=\"'Click to refresh this field. This will update any calculated values, fetch latest data from services, or reload available options'\"\r\n color=\"primary\" matSuffix mat-icon-button>\r\n <mat-icon>\r\n sync\r\n </mat-icon>\r\n </button>\r\n } -->\r\n\r\n\r\n @if(inputConfig().hintLabel || classInput.temporaryHint ){\r\n <mat-hint class=\"inputHint\">\r\n {{ classInput.temporaryHint || inputConfig().hintLabel}}\r\n </mat-hint>\r\n }\r\n @if(inputConfig().canReload?.canReload){\r\n <button 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()\" matSuffix>\r\n <mat-icon\r\n style=\"color:var(--mat-sys-primary)\"\r\n >sync</mat-icon>\r\n </button>\r\n }\r\n\r\n\r\n <!-- Prefix Icon -->\r\n @if (inputConfig().prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig().prefixIcon }}</mat-icon>\r\n }\r\n\r\n <!-- Suffix Icon or Password Visibility Toggle -->\r\n <!-- <ng-container *ngIf=\"inputConfig.suffixIcon\">\r\n <mat-icon *ngIf=\"inputConfig.id !== 'password'\" matSuffix>{{ inputConfig.suffixIcon\r\n }}</mat-icon>\r\n <button *ngIf=\"inputConfig.id === 'password'\" (click)=\"classInput.togglePasswordVisibility()\"\r\n mat-icon-button matSuffix>\r\n <mat-icon>{{ classInput.showPassword ? 'remove_red_eye' : 'eye_off' }}</mat-icon>\r\n </button>\r\n </ng-container> -->\r\n\r\n <!-- Prefix & Suffix Text -->\r\n @if (inputConfig().prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig().prefixText }}</span>\r\n }\r\n @if (inputConfig().suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig().suffixText }}</span>\r\n }\r\n\r\n <!-- Character Count Hint -->\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\r\n <!-- Password Strength Hint -->\r\n @if (inputConfig().type === 'password') {\r\n <mat-hint [style.color]=\"passwordStrengthColor(inputConfig().id)\"\r\n matTooltip=\"The password should be at least 8 characters long. Have at least one uppercase letter, one lowercase, one digit, one special character.\"\r\n align=\"end\">\r\n {{ checkPasswordStrength(inputConfig().id) }} password\r\n </mat-hint>\r\n }\r\n <!-- @if(inputConfig?.canReload){\r\n <mat-hint align=\"end\">\r\n\r\n <button click=\" canReload.emit()\" style=\" height: 28px;\r\n width: 28px;\r\n padding: 0px;\r\n font-size: 1em;\" [matTooltip]=\"'Reload ' + inputConfig.label +' resources'\" mat-icon-button>\r\n <mat-icon>\r\n sync\r\n </mat-icon>\r\n\r\n </button>\r\n </mat-hint>\r\n\r\n\r\n } -->\r\n </mat-form-field>\r\n }\r\n\r\n\r\n\r\n\r\n</ng-container>\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: 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: MatInputModule }, { 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: i2$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: ReactiveFormsModule }, { 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: "component", type: TFormInputStatusComponent, selector: "lib-t-form-input-status", inputs: ["inputConfig"] }, { kind: "component", type: InputCustomComponent, selector: "lib-input-custom", inputs: ["inputConfig"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
69
69
|
}
|
|
70
70
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: BasicInputInputElementComponent, 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 { BasicInputInputElementComponent };
|
|
85
|
-
//# sourceMappingURL=ngx-t-forms-basic-input-input-element.component-
|
|
85
|
+
//# sourceMappingURL=ngx-t-forms-basic-input-input-element.component-BJKe9wIA.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-basic-input-input-element.component-fJIsRm0v.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/basic-input-input-element/basic-input-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/basic-input-input-element/basic-input-input-element.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { ReactiveFormsModule, FormGroup, FormControl } from '@angular/forms';\r\n\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\nimport { InputPipeTypes, ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { InputCustomComponent } from './core/input-custom/input-custom.component';\r\n\r\n@Component({\r\n selector: 'lib-basic-input-input-element',\r\n imports: [\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n ReactiveFormsModule,\r\n TFormInputStatusComponent,\r\n InputCustomComponent,\r\n ],\r\n templateUrl: './basic-input-input-element.component.html',\r\n styleUrl: './basic-input-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class BasicInputInputElementComponent {\r\n\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n\r\n readonly reload = output<void>();\r\n\r\n protected readonly formControl = computed(\r\n () => this.formGroup().controls[this.inputConfig().id] as FormControl<unknown>,\r\n );\r\n\r\n protected readonly errorMessage = computed(\r\n () => getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n\r\n protected readonly hasError = computed(() => {\r\n // Correctly access the control within the form group\r\n const control = this.formGroup().get(this.inputConfig().id);\r\n return control?.invalid && (control?.touched || control?.dirty);\r\n });\r\n\r\n protected readonly currencyPrefix = computed(() => {\r\n const hasPipe = this.inputConfig().pipe?.pipeType === InputPipeTypes.Currency;\r\n if (!hasPipe) return undefined;\r\n return this.inputConfig().pipe?.param;\r\n });\r\n\r\n protected passwordStrengthColor(formControlName: string) {\r\n const form = this.formGroup();\r\n const value: string = form?.value[formControlName];\r\n let strongPassword = new RegExp(\r\n '(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9])(?=.{8,})'\r\n );\r\n let mediumPassword = new RegExp(\r\n '((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9])(?=.{6,}))|((?=.*[a-z])(?=.*[A-Z])(?=.*[^A-Za-z0-9])(?=.{8,}))'\r\n );\r\n if (strongPassword.test(value)) {\r\n return 'var(--ion-color-success)';\r\n } else if (mediumPassword.test(value)) {\r\n return 'var(--ion-color-warning)';\r\n } else {\r\n return 'var(--ion-color-danger)';\r\n }\r\n }\r\n\r\n protected checkPasswordStrength(formControlName: string) {\r\n const form = this.formGroup();\r\n\r\n const value: string = form?.value[formControlName];\r\n let strongPassword = new RegExp(\r\n '(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9])(?=.{8,})'\r\n );\r\n let mediumPassword = new RegExp(\r\n '((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9])(?=.{6,}))|((?=.*[a-z])(?=.*[A-Z])(?=.*[^A-Za-z0-9])(?=.{8,}))'\r\n );\r\n if (strongPassword.test(value)) {\r\n return 'strong';\r\n } else if (mediumPassword.test(value)) {\r\n return 'medium';\r\n } else {\r\n return 'weak';\r\n }\r\n\r\n }\r\n}\r\n","<ng-container [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as classInput) {\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 @if(currencyPrefix()){\r\n <span style=\"color: var(--mat-sys-primary);padding-right: 4px;\" matTextPrefix>{{currencyPrefix()}} </span>\r\n }\r\n\r\n <lib-input-custom [inputConfig]=\"inputConfig()\" [required]=\"inputConfig().required\"\r\n [formControlName]=\"inputConfig().id\"></lib-input-custom>\r\n\r\n @if(errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{errorMessage()}}</mat-error>\r\n }\r\n <!-- [type]=\"this.inputConfig.showPassword ? 'text' : this.inputConfig.type||'text'\"-->\r\n <!-- @if(classInput.canRefresh){\r\n <button\r\n (click)=\"classInput.refresh()\"\r\n style=\" min-width: 1%;\"\r\n [matTooltip]=\"'Click to refresh this field. This will update any calculated values, fetch latest data from services, or reload available options'\"\r\n color=\"primary\" matSuffix mat-icon-button>\r\n <mat-icon>\r\n sync\r\n </mat-icon>\r\n </button>\r\n } -->\r\n\r\n\r\n @if(inputConfig().hintLabel || classInput.temporaryHint ){\r\n <mat-hint class=\"inputHint\">\r\n {{ classInput.temporaryHint || inputConfig().hintLabel}}\r\n </mat-hint>\r\n }\r\n @if(inputConfig().canReload?.canReload){\r\n <button 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()\" matSuffix>\r\n <mat-icon\r\n style=\"color:var(--mat-sys-primary)\"\r\n >sync</mat-icon>\r\n </button>\r\n }\r\n\r\n\r\n <!-- Prefix Icon -->\r\n @if (inputConfig().prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig().prefixIcon }}</mat-icon>\r\n }\r\n\r\n <!-- Suffix Icon or Password Visibility Toggle -->\r\n <!-- <ng-container *ngIf=\"inputConfig.suffixIcon\">\r\n <mat-icon *ngIf=\"inputConfig.id !== 'password'\" matSuffix>{{ inputConfig.suffixIcon\r\n }}</mat-icon>\r\n <button *ngIf=\"inputConfig.id === 'password'\" (click)=\"classInput.togglePasswordVisibility()\"\r\n mat-icon-button matSuffix>\r\n <mat-icon>{{ classInput.showPassword ? 'remove_red_eye' : 'eye_off' }}</mat-icon>\r\n </button>\r\n </ng-container> -->\r\n\r\n <!-- Prefix & Suffix Text -->\r\n @if (inputConfig().prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig().prefixText }}</span>\r\n }\r\n @if (inputConfig().suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig().suffixText }}</span>\r\n }\r\n\r\n <!-- Character Count Hint -->\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\r\n <!-- Password Strength Hint -->\r\n @if (inputConfig().type === 'password') {\r\n <mat-hint [style.color]=\"passwordStrengthColor(inputConfig().id)\"\r\n matTooltip=\"The password should be at least 8 characters long. Have at least one uppercase letter, one lowercase, one digit, one special character.\"\r\n align=\"end\">\r\n {{ checkPasswordStrength(inputConfig().id) }} password\r\n </mat-hint>\r\n }\r\n <!-- @if(inputConfig?.canReload){\r\n <mat-hint align=\"end\">\r\n\r\n <button click=\" canReload.emit()\" style=\" height: 28px;\r\n width: 28px;\r\n padding: 0px;\r\n font-size: 1em;\" [matTooltip]=\"'Reload ' + inputConfig.label +' resources'\" mat-icon-button>\r\n <mat-icon>\r\n sync\r\n </mat-icon>\r\n\r\n </button>\r\n </mat-hint>\r\n\r\n\r\n } -->\r\n </mat-form-field>\r\n }\r\n\r\n\r\n\r\n\r\n</ng-container>\r\n"],"names":["i1","i2","i4","i5"],"mappings":";;;;;;;;;;;;;;;;;MA8Ba,+BAA+B,CAAA;AAhB5C,IAAA,WAAA,GAAA;AAkBW,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,QAAQ,iFAAoB;AAChD,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,+EAAa;QAEvC,IAAA,CAAA,MAAM,GAAG,MAAM,EAAQ;QAEb,IAAA,CAAA,WAAW,GAAG,QAAQ,CACvC,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,CAAyB,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,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BAChB,mBAAmB;wBACnB,yBAAyB;wBACzB,oBAAoB;qBACrB,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6mIAAA,EAAA,MAAA,EAAA,CAAA,oJAAA,CAAA,EAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-basic-input-input-element.component-BJKe9wIA.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/basic-input-input-element/basic-input-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/basic-input-input-element/basic-input-input-element.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { ReactiveFormsModule, FormGroup, FormControl } from '@angular/forms';\r\n\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\nimport { InputPipeTypes, ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { InputCustomComponent } from './core/input-custom/input-custom.component';\r\n\r\n@Component({\r\n selector: 'lib-basic-input-input-element',\r\n imports: [\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n ReactiveFormsModule,\r\n TFormInputStatusComponent,\r\n InputCustomComponent,\r\n ],\r\n templateUrl: './basic-input-input-element.component.html',\r\n styleUrl: './basic-input-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class BasicInputInputElementComponent {\r\n\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n\r\n readonly reload = output<void>();\r\n\r\n protected readonly formControl = computed(\r\n () => this.formGroup().controls[this.inputConfig().id] as FormControl<unknown>,\r\n );\r\n\r\n protected readonly errorMessage = computed(\r\n () => getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n\r\n protected readonly hasError = computed(() => {\r\n // Correctly access the control within the form group\r\n const control = this.formGroup().get(this.inputConfig().id);\r\n return control?.invalid && (control?.touched || control?.dirty);\r\n });\r\n\r\n protected readonly currencyPrefix = computed(() => {\r\n const hasPipe = this.inputConfig().pipe?.pipeType === InputPipeTypes.Currency;\r\n if (!hasPipe) return undefined;\r\n return this.inputConfig().pipe?.param;\r\n });\r\n\r\n protected passwordStrengthColor(formControlName: string) {\r\n const form = this.formGroup();\r\n const value: string = form?.value[formControlName];\r\n let strongPassword = new RegExp(\r\n '(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9])(?=.{8,})'\r\n );\r\n let mediumPassword = new RegExp(\r\n '((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9])(?=.{6,}))|((?=.*[a-z])(?=.*[A-Z])(?=.*[^A-Za-z0-9])(?=.{8,}))'\r\n );\r\n if (strongPassword.test(value)) {\r\n return 'var(--ion-color-success)';\r\n } else if (mediumPassword.test(value)) {\r\n return 'var(--ion-color-warning)';\r\n } else {\r\n return 'var(--ion-color-danger)';\r\n }\r\n }\r\n\r\n protected checkPasswordStrength(formControlName: string) {\r\n const form = this.formGroup();\r\n\r\n const value: string = form?.value[formControlName];\r\n let strongPassword = new RegExp(\r\n '(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9])(?=.{8,})'\r\n );\r\n let mediumPassword = new RegExp(\r\n '((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9])(?=.{6,}))|((?=.*[a-z])(?=.*[A-Z])(?=.*[^A-Za-z0-9])(?=.{8,}))'\r\n );\r\n if (strongPassword.test(value)) {\r\n return 'strong';\r\n } else if (mediumPassword.test(value)) {\r\n return 'medium';\r\n } else {\r\n return 'weak';\r\n }\r\n\r\n }\r\n}\r\n","<ng-container [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as classInput) {\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 @if(currencyPrefix()){\r\n <span style=\"color: var(--mat-sys-primary);padding-right: 4px;\" matTextPrefix>{{currencyPrefix()}} </span>\r\n }\r\n\r\n <lib-input-custom [inputConfig]=\"inputConfig()\" [required]=\"inputConfig().required\"\r\n [formControlName]=\"inputConfig().id\"></lib-input-custom>\r\n\r\n @if(errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{errorMessage()}}</mat-error>\r\n }\r\n <!-- [type]=\"this.inputConfig.showPassword ? 'text' : this.inputConfig.type||'text'\"-->\r\n <!-- @if(classInput.canRefresh){\r\n <button\r\n (click)=\"classInput.refresh()\"\r\n style=\" min-width: 1%;\"\r\n [matTooltip]=\"'Click to refresh this field. This will update any calculated values, fetch latest data from services, or reload available options'\"\r\n color=\"primary\" matSuffix mat-icon-button>\r\n <mat-icon>\r\n sync\r\n </mat-icon>\r\n </button>\r\n } -->\r\n\r\n\r\n @if(inputConfig().hintLabel || classInput.temporaryHint ){\r\n <mat-hint class=\"inputHint\">\r\n {{ classInput.temporaryHint || inputConfig().hintLabel}}\r\n </mat-hint>\r\n }\r\n @if(inputConfig().canReload?.canReload){\r\n <button 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()\" matSuffix>\r\n <mat-icon\r\n style=\"color:var(--mat-sys-primary)\"\r\n >sync</mat-icon>\r\n </button>\r\n }\r\n\r\n\r\n <!-- Prefix Icon -->\r\n @if (inputConfig().prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig().prefixIcon }}</mat-icon>\r\n }\r\n\r\n <!-- Suffix Icon or Password Visibility Toggle -->\r\n <!-- <ng-container *ngIf=\"inputConfig.suffixIcon\">\r\n <mat-icon *ngIf=\"inputConfig.id !== 'password'\" matSuffix>{{ inputConfig.suffixIcon\r\n }}</mat-icon>\r\n <button *ngIf=\"inputConfig.id === 'password'\" (click)=\"classInput.togglePasswordVisibility()\"\r\n mat-icon-button matSuffix>\r\n <mat-icon>{{ classInput.showPassword ? 'remove_red_eye' : 'eye_off' }}</mat-icon>\r\n </button>\r\n </ng-container> -->\r\n\r\n <!-- Prefix & Suffix Text -->\r\n @if (inputConfig().prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig().prefixText }}</span>\r\n }\r\n @if (inputConfig().suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig().suffixText }}</span>\r\n }\r\n\r\n <!-- Character Count Hint -->\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\r\n <!-- Password Strength Hint -->\r\n @if (inputConfig().type === 'password') {\r\n <mat-hint [style.color]=\"passwordStrengthColor(inputConfig().id)\"\r\n matTooltip=\"The password should be at least 8 characters long. Have at least one uppercase letter, one lowercase, one digit, one special character.\"\r\n align=\"end\">\r\n {{ checkPasswordStrength(inputConfig().id) }} password\r\n </mat-hint>\r\n }\r\n <!-- @if(inputConfig?.canReload){\r\n <mat-hint align=\"end\">\r\n\r\n <button click=\" canReload.emit()\" style=\" height: 28px;\r\n width: 28px;\r\n padding: 0px;\r\n font-size: 1em;\" [matTooltip]=\"'Reload ' + inputConfig.label +' resources'\" mat-icon-button>\r\n <mat-icon>\r\n sync\r\n </mat-icon>\r\n\r\n </button>\r\n </mat-hint>\r\n\r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