ngx-t-forms 3.0.0 → 3.1.1
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-CZm3Z_7B.mjs +411 -0
- package/fesm2022/ngx-t-forms-api-endpoint-config.component-CZm3Z_7B.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DFApar1W.mjs → ngx-t-forms-auto-complete-input-element.component-IciY6hb3.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DFApar1W.mjs.map → ngx-t-forms-auto-complete-input-element.component-IciY6hb3.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-ChCeve-w.mjs → ngx-t-forms-basic-input-input-element.component-CykKxWu0.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-ChCeve-w.mjs.map → ngx-t-forms-basic-input-input-element.component-CykKxWu0.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-CwI-WEX7.mjs +643 -0
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-CwI-WEX7.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-B54kOArR.mjs → ngx-t-forms-chip-options-creator-editor.component-CO_3EQ_v.mjs} +4 -4
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-CO_3EQ_v.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-conditional-display-config.component-Cmf7gDfO.mjs +513 -0
- package/fesm2022/ngx-t-forms-conditional-display-config.component-Cmf7gDfO.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CAZv0_uR.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-BHiOEQe4.mjs} +4 -4
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-BHiOEQe4.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-data-source-picker.component-CN51SdCK.mjs +261 -0
- package/fesm2022/ngx-t-forms-data-source-picker.component-CN51SdCK.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-NM2cFs3P.mjs → ngx-t-forms-date-picker-input-element.component-c3OSDXWw.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-NM2cFs3P.mjs.map → ngx-t-forms-date-picker-input-element.component-c3OSDXWw.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-C-4fqOF0.mjs +166 -0
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-C-4fqOF0.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-DLzba2AQ.mjs +373 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-DLzba2AQ.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-document-picker.component-9clYsOcl.mjs +1259 -0
- package/fesm2022/ngx-t-forms-document-picker.component-9clYsOcl.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-editor-input-element.component-BGdZ4evj.mjs +417 -0
- package/fesm2022/ngx-t-forms-editor-input-element.component-BGdZ4evj.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-editor-js-input.component-DlsLiHi1.mjs → ngx-t-forms-editor-js-input.component-02HnmInT.mjs} +25 -11
- package/fesm2022/ngx-t-forms-editor-js-input.component-02HnmInT.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-Km-qgANx.mjs → ngx-t-forms-file-upload-input-element.component-BF7KbSPb.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-Km-qgANx.mjs.map → ngx-t-forms-file-upload-input-element.component-BF7KbSPb.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-input-selector.component-vCj2SCxs.mjs +86 -0
- package/fesm2022/ngx-t-forms-form-input-selector.component-vCj2SCxs.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-form-json-view.component-r64GKVhI.mjs → ngx-t-forms-form-json-view.component-Cmw1hHGZ.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-r64GKVhI.mjs.map → ngx-t-forms-form-json-view.component-Cmw1hHGZ.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-B3DRJ--U.mjs → ngx-t-forms-form-section-stepper.component-CFdwgxRl.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-B3DRJ--U.mjs.map → ngx-t-forms-form-section-stepper.component-CFdwgxRl.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-BYFynpTn.mjs → ngx-t-forms-forms-builder-menu.component-DisrOv5x.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-BYFynpTn.mjs.map → ngx-t-forms-forms-builder-menu.component-DisrOv5x.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-geo-location.component-D2fIbagr.mjs → ngx-t-forms-geo-location.component-D-BhLdx6.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-geo-location.component-D2fIbagr.mjs.map → ngx-t-forms-geo-location.component-D-BhLdx6.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-header-template-editor.component-Z5frEhho.mjs +159 -0
- package/fesm2022/ngx-t-forms-header-template-editor.component-Z5frEhho.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-BgnzErQt.mjs → ngx-t-forms-image-capture-input-element.component-CoJTXMbL.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-BgnzErQt.mjs.map → ngx-t-forms-image-capture-input-element.component-CoJTXMbL.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-index-D8xr_Sxp.mjs +2 -0
- package/fesm2022/ngx-t-forms-index-D8xr_Sxp.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-custom.component-Dcoze7U3.mjs → ngx-t-forms-input-custom.component-s1ryJQy4.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-input-custom.component-Dcoze7U3.mjs.map → ngx-t-forms-input-custom.component-s1ryJQy4.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-input-editor.component-oIzCTmbx.mjs +190 -0
- package/fesm2022/ngx-t-forms-input-editor.component-oIzCTmbx.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-BsfvYiEU.mjs → ngx-t-forms-map-mat-options-keys-C1kxlZS_.mjs} +2 -3
- package/fesm2022/ngx-t-forms-map-mat-options-keys-C1kxlZS_.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-CYtTBtyf.mjs → ngx-t-forms-mat-chip-list-editor.component-wskkKr4y.mjs} +5 -5
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-wskkKr4y.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-CEa8ZNKA.mjs → ngx-t-forms-missing-form-configs.component-C1XuXRdn.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-CEa8ZNKA.mjs.map → ngx-t-forms-missing-form-configs.component-C1XuXRdn.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-DklkxNgg.mjs → ngx-t-forms-mscoa-chart-toolbar.component-BJrOTRuQ.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-DklkxNgg.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-BJrOTRuQ.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-GyKF31Ve.mjs +447 -0
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-GyKF31Ve.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BrPJPR2R.mjs +905 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BrPJPR2R.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-0gzvHzEK.mjs → ngx-t-forms-ngx-t-forms-DqAcUfN4.mjs} +2738 -415
- package/fesm2022/ngx-t-forms-ngx-t-forms-DqAcUfN4.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-paginated-selection-table-DrXB22iY.mjs → ngx-t-forms-paginated-selection-table-Bk77dBo9.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-paginated-selection-table-DrXB22iY.mjs.map → ngx-t-forms-paginated-selection-table-Bk77dBo9.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-payload-template-editor.component-CVzOTLYE.mjs +85 -0
- package/fesm2022/ngx-t-forms-payload-template-editor.component-CVzOTLYE.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-7Vfwaqnx.mjs +748 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-7Vfwaqnx.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-record-list-manager.component-l-2uDVmi.mjs → ngx-t-forms-record-list-manager.component-CfZdqKhY.mjs} +4 -4
- package/fesm2022/ngx-t-forms-record-list-manager.component-CfZdqKhY.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-CK7NIhbq.mjs +272 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-CK7NIhbq.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-YChv7Arm.mjs +699 -0
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-YChv7Arm.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-BYMcaRE5.mjs → ngx-t-forms-section-report.component-DhSaf85h.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-section-report.component-BYMcaRE5.mjs.map → ngx-t-forms-section-report.component-DhSaf85h.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-select-input-element.component-Nsa3dpvV.mjs → ngx-t-forms-select-input-element.component-D5HFzh35.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-select-input-element.component-Nsa3dpvV.mjs.map → ngx-t-forms-select-input-element.component-D5HFzh35.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-selection-options-editor.component-BhmmJOco.mjs +169 -0
- package/fesm2022/ngx-t-forms-selection-options-editor.component-BhmmJOco.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-DAwP-cWK.mjs → ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs} +3 -3
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-DPxUzkAu.mjs → ngx-t-forms-textarea-input-element.component-DWEADTsz.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-DPxUzkAu.mjs.map → ngx-t-forms-textarea-input-element.component-DWEADTsz.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-OZre5TJ7.mjs → ngx-t-forms-toggle-input-element.component-XZi6kPnL.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-OZre5TJ7.mjs.map → ngx-t-forms-toggle-input-element.component-XZi6kPnL.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-0_Y6bvtE.mjs +574 -0
- package/fesm2022/ngx-t-forms-validators-config.component-0_Y6bvtE.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CrDZg3Nl.mjs → ngx-t-forms-workflow-adjudication.component-Gkimmw-X.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CrDZg3Nl.mjs.map → ngx-t-forms-workflow-adjudication.component-Gkimmw-X.mjs.map} +1 -1
- 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 +110 -6
- package/fesm2022/ngx-t-forms-auto-complete-input-element.component-7g5cpVfB.mjs +0 -261
- package/fesm2022/ngx-t-forms-auto-complete-input-element.component-7g5cpVfB.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-basic-input-input-element.component-BhMw2vpl.mjs +0 -225
- package/fesm2022/ngx-t-forms-basic-input-input-element.component-BhMw2vpl.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-BmWnrfWN.mjs +0 -1011
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-BmWnrfWN.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-CJMwqoHL.mjs +0 -643
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-CJMwqoHL.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-ALkkDotT.mjs +0 -136
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-ALkkDotT.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-B54kOArR.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CAZv0_uR.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Dap7QkKD.mjs +0 -253
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Dap7QkKD.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-data-source-picker.component-8G28L1Cg.mjs +0 -261
- package/fesm2022/ngx-t-forms-data-source-picker.component-8G28L1Cg.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-data-source-picker.component-CJ1C1Znp.mjs +0 -419
- package/fesm2022/ngx-t-forms-data-source-picker.component-CJ1C1Znp.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-date-picker-input-element.component-DjYq63Iv.mjs +0 -231
- package/fesm2022/ngx-t-forms-date-picker-input-element.component-DjYq63Iv.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-DhU_bhy3.mjs +0 -156
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-DhU_bhy3.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-g0wIRj9b.mjs +0 -333
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-g0wIRj9b.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-K-KFdCcS.mjs +0 -373
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-K-KFdCcS.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-NuPXy_Ms.mjs +0 -543
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-NuPXy_Ms.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-picker.component-BSG7k3IN.mjs +0 -1259
- package/fesm2022/ngx-t-forms-document-picker.component-BSG7k3IN.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-picker.component-ChGqXHcQ.mjs +0 -1996
- package/fesm2022/ngx-t-forms-document-picker.component-ChGqXHcQ.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-editor-input-element.component-B8Pk-EVY.mjs +0 -581
- package/fesm2022/ngx-t-forms-editor-input-element.component-B8Pk-EVY.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-editor-input-element.component-Bb7w-vNw.mjs +0 -417
- package/fesm2022/ngx-t-forms-editor-input-element.component-Bb7w-vNw.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-editor-js-input.component-DlsLiHi1.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-editor-js-input.component-XX6kU8DW.mjs +0 -585
- package/fesm2022/ngx-t-forms-editor-js-input.component-XX6kU8DW.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-file-upload-input-element.component-RCmUClXv.mjs +0 -447
- package/fesm2022/ngx-t-forms-file-upload-input-element.component-RCmUClXv.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-input-selector.component-0jfD5C0G.mjs +0 -163
- package/fesm2022/ngx-t-forms-form-input-selector.component-0jfD5C0G.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-input-selector.component-D5KYWQ2R.mjs +0 -86
- package/fesm2022/ngx-t-forms-form-input-selector.component-D5KYWQ2R.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-json-view.component-z0nQxpqB.mjs +0 -28
- package/fesm2022/ngx-t-forms-form-json-view.component-z0nQxpqB.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-payload-projection.component-CkH7zmdJ.mjs +0 -291
- package/fesm2022/ngx-t-forms-form-payload-projection.component-CkH7zmdJ.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-form-section-stepper.component-UUTHYU-A.mjs +0 -936
- package/fesm2022/ngx-t-forms-form-section-stepper.component-UUTHYU-A.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-DTIAOxGV.mjs +0 -816
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-DTIAOxGV.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-geo-location.component-DW2b5Zli.mjs +0 -329
- package/fesm2022/ngx-t-forms-geo-location.component-DW2b5Zli.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-image-capture-input-element.component-Us_NAQSl.mjs +0 -360
- package/fesm2022/ngx-t-forms-image-capture-input-element.component-Us_NAQSl.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-index-6YIhS6cm.mjs +0 -2
- package/fesm2022/ngx-t-forms-index-6YIhS6cm.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-index-BPNBX_ve.mjs +0 -2
- package/fesm2022/ngx-t-forms-index-BPNBX_ve.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-custom.component-DQOqy047.mjs +0 -128
- package/fesm2022/ngx-t-forms-input-custom.component-DQOqy047.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-editor.component-3fRj5swF.mjs +0 -512
- package/fesm2022/ngx-t-forms-input-editor.component-3fRj5swF.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-editor.component-B6UKwV4i.mjs +0 -190
- package/fesm2022/ngx-t-forms-input-editor.component-B6UKwV4i.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-map-mat-options-keys-BsfvYiEU.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-map-mat-options-keys-eSc99wdA.mjs +0 -132
- package/fesm2022/ngx-t-forms-map-mat-options-keys-eSc99wdA.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CN17K5q6.mjs +0 -268
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CN17K5q6.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CYtTBtyf.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.mjs +0 -241
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.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-mat-slider-toggle-editor.component-D0F1d1mO.mjs +0 -180
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-D0F1d1mO.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-missing-form-configs.component-AaDfeALs.mjs +0 -114
- package/fesm2022/ngx-t-forms-missing-form-configs.component-AaDfeALs.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D0igUV3W.mjs +0 -69
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D0igUV3W.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-error-display.component-rzl-fMmd.mjs +0 -200
- package/fesm2022/ngx-t-forms-mscoa-error-display.component-rzl-fMmd.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-2SspNWtF.mjs +0 -447
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-2SspNWtF.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CSGf4XeN.mjs +0 -850
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CSGf4XeN.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-CBuGHwnU.mjs +0 -107
- package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-CBuGHwnU.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CbQdnVgw.mjs +0 -1665
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CbQdnVgw.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-dmRIi9ph.mjs +0 -905
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-dmRIi9ph.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-0gzvHzEK.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-BefvSS-p.mjs +0 -28237
- package/fesm2022/ngx-t-forms-ngx-t-forms-BefvSS-p.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-paginated-selection-table-BGNxI2yq.mjs +0 -1024
- package/fesm2022/ngx-t-forms-paginated-selection-table-BGNxI2yq.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-payload-template-editor.component-DL4ZTTsH.mjs +0 -203
- package/fesm2022/ngx-t-forms-payload-template-editor.component-DL4ZTTsH.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-payload-template-editor.component-o3qwpvYu.mjs +0 -234
- package/fesm2022/ngx-t-forms-payload-template-editor.component-o3qwpvYu.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-pipeline-generator.component-BqtdKcN2.mjs +0 -1126
- package/fesm2022/ngx-t-forms-pipeline-generator.component-BqtdKcN2.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-pipeline-generator.component-DcZPv8-N.mjs +0 -748
- package/fesm2022/ngx-t-forms-pipeline-generator.component-DcZPv8-N.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-record-list-manager.component-BcANl5Bq.mjs +0 -639
- package/fesm2022/ngx-t-forms-record-list-manager.component-BcANl5Bq.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-record-list-manager.component-l-2uDVmi.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-BMmNxeE-.mjs +0 -272
- package/fesm2022/ngx-t-forms-required-inputs.component-BMmNxeE-.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-Dr0P1gin.mjs +0 -451
- package/fesm2022/ngx-t-forms-required-inputs.component-Dr0P1gin.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-BSv_KQIU.mjs +0 -625
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-BSv_KQIU.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-C3sNmq_H.mjs +0 -444
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-C3sNmq_H.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-search-field.component-BGdAmzJV.mjs +0 -72
- package/fesm2022/ngx-t-forms-search-field.component-BGdAmzJV.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-section-report.component-yGAjX7Gb.mjs +0 -248
- package/fesm2022/ngx-t-forms-section-report.component-yGAjX7Gb.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-select-input-element.component-BqtJi4ek.mjs +0 -408
- package/fesm2022/ngx-t-forms-select-input-element.component-BqtJi4ek.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-selection-options-editor.component-BuXVzo7Z.mjs +0 -169
- package/fesm2022/ngx-t-forms-selection-options-editor.component-BuXVzo7Z.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-selection-options-editor.component-_glw1cqH.mjs +0 -275
- package/fesm2022/ngx-t-forms-selection-options-editor.component-_glw1cqH.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-CLgN3YM4.mjs +0 -366
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-CLgN3YM4.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-DAwP-cWK.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-textarea-input-element.component-SCEBLqJd.mjs +0 -233
- package/fesm2022/ngx-t-forms-textarea-input-element.component-SCEBLqJd.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-toggle-input-element.component-CoyTMRMa.mjs +0 -305
- package/fesm2022/ngx-t-forms-toggle-input-element.component-CoyTMRMa.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-validators-config.component-B1Lzs7o2.mjs +0 -1105
- package/fesm2022/ngx-t-forms-validators-config.component-B1Lzs7o2.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-validators-config.component-CoGSFor3.mjs +0 -574
- package/fesm2022/ngx-t-forms-validators-config.component-CoGSFor3.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-Bz07jv-N.mjs +0 -2923
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-Bz07jv-N.mjs.map +0 -1
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, output, ViewEncapsulation, ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
4
|
-
import { NgControl } from '@angular/forms';
|
|
5
|
-
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
6
|
-
import * as i1 from '@angular/material/slider';
|
|
7
|
-
import { MatSliderModule } from '@angular/material/slider';
|
|
8
|
-
import { Subject } from 'rxjs';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal Material slider editor implementing `MatFormFieldControl<number>`
|
|
12
|
-
* for the dynamic-data-edit configuration surface.
|
|
13
|
-
*
|
|
14
|
-
* Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,
|
|
15
|
-
* hint, and validation errors — so this component owns only the slider track,
|
|
16
|
-
* the live value readout, and the min/max bound labels.
|
|
17
|
-
*
|
|
18
|
-
* NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /
|
|
19
|
-
* `required` / `placeholder` / `id` members, `@Input()` decorators, the
|
|
20
|
-
* `focused` / `touched` / `stateChanges` members, and the `useExisting`
|
|
21
|
-
* provider. These are framework wiring, not defects — the CLAUDE.md bans on
|
|
22
|
-
* `@Input()` / `useExisting` do not apply to MatFormFieldControl integration.
|
|
23
|
-
*/
|
|
24
|
-
class MatSliderEditorComponent {
|
|
25
|
-
constructor() {
|
|
26
|
-
/** Emits whenever a piece of `MatFormFieldControl` state changes. */
|
|
27
|
-
this.stateChanges = new Subject();
|
|
28
|
-
this.controlType = 'lib-mat-slider-editor';
|
|
29
|
-
this.id = `lib-mat-slider-editor-${MatSliderEditorComponent.nextId++}`;
|
|
30
|
-
this.placeholder = '';
|
|
31
|
-
this.focused = false;
|
|
32
|
-
this.touched = false;
|
|
33
|
-
this.describedBy = '';
|
|
34
|
-
this.autofilled = false;
|
|
35
|
-
this.userAriaDescribedBy = undefined;
|
|
36
|
-
this.disableAutomaticLabeling = undefined;
|
|
37
|
-
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
38
|
-
/** Validation errors surfaced by the parent for error-state derivation. */
|
|
39
|
-
this.errors = [];
|
|
40
|
-
/** Accessible label for the slider thumb. */
|
|
41
|
-
this.label = '';
|
|
42
|
-
/** Thumb-tooltip formatter (Material `displayWith`). Optional — the parent's editor config may supply `undefined`. */
|
|
43
|
-
this.format = (value) => value;
|
|
44
|
-
/** Fallback formatter used by the value readout when `format` is absent. */
|
|
45
|
-
this.formatLabel = (value) => value;
|
|
46
|
-
this.#min = 0;
|
|
47
|
-
this.#max = 100;
|
|
48
|
-
this.#step = 1;
|
|
49
|
-
this.#disabled = false;
|
|
50
|
-
this.#value = 0;
|
|
51
|
-
this.#required = false;
|
|
52
|
-
/** Emits the new slider value when the user drags the thumb. */
|
|
53
|
-
this.valueChange = output();
|
|
54
|
-
/**
|
|
55
|
-
* Adapter for Material's `displayWith`, which requires a `string` return.
|
|
56
|
-
* Wraps the `format` thumb-tooltip formatter.
|
|
57
|
-
*/
|
|
58
|
-
this.displayWith = (value) => String(this.format ? this.format(value) : value);
|
|
59
|
-
this.onTouched = () => { };
|
|
60
|
-
}
|
|
61
|
-
static { this.nextId = 0; }
|
|
62
|
-
#min;
|
|
63
|
-
/** Lower bound of the slider. */
|
|
64
|
-
get min() {
|
|
65
|
-
return this.#min;
|
|
66
|
-
}
|
|
67
|
-
set min(value) {
|
|
68
|
-
this.#min = this.#toNumber(value, 0);
|
|
69
|
-
this.stateChanges.next();
|
|
70
|
-
}
|
|
71
|
-
#max;
|
|
72
|
-
/** Upper bound of the slider. */
|
|
73
|
-
get max() {
|
|
74
|
-
return this.#max;
|
|
75
|
-
}
|
|
76
|
-
set max(value) {
|
|
77
|
-
this.#max = this.#toNumber(value, 100);
|
|
78
|
-
this.stateChanges.next();
|
|
79
|
-
}
|
|
80
|
-
#step;
|
|
81
|
-
/** Increment between selectable values; also drives tick-mark spacing. */
|
|
82
|
-
get step() {
|
|
83
|
-
return this.#step;
|
|
84
|
-
}
|
|
85
|
-
set step(value) {
|
|
86
|
-
this.#step = this.#toNumber(value, 1);
|
|
87
|
-
this.stateChanges.next();
|
|
88
|
-
}
|
|
89
|
-
#disabled;
|
|
90
|
-
/** Whether the slider is inert. */
|
|
91
|
-
get disabled() {
|
|
92
|
-
return this.#disabled;
|
|
93
|
-
}
|
|
94
|
-
set disabled(value) {
|
|
95
|
-
this.#disabled = coerceBooleanProperty(value);
|
|
96
|
-
this.stateChanges.next();
|
|
97
|
-
}
|
|
98
|
-
#value;
|
|
99
|
-
/** Current numeric value of the slider. */
|
|
100
|
-
get value() {
|
|
101
|
-
return this.#value;
|
|
102
|
-
}
|
|
103
|
-
set value(value) {
|
|
104
|
-
this.#value = this.#toNumber(value, 0);
|
|
105
|
-
this.stateChanges.next();
|
|
106
|
-
}
|
|
107
|
-
#required;
|
|
108
|
-
/** Whether a value is required. */
|
|
109
|
-
get required() {
|
|
110
|
-
return this.#required;
|
|
111
|
-
}
|
|
112
|
-
set required(value) {
|
|
113
|
-
this.#required = coerceBooleanProperty(value);
|
|
114
|
-
this.stateChanges.next();
|
|
115
|
-
}
|
|
116
|
-
// MatFormFieldControl reads these as plain getters during its own change
|
|
117
|
-
// detection, so they stay getters rather than `computed()` signals.
|
|
118
|
-
/**
|
|
119
|
-
* Whether the control holds no user selection.
|
|
120
|
-
*
|
|
121
|
-
* BEHAVIOUR FLAG: a value of `0` is a real selection, so it is NOT empty.
|
|
122
|
-
* The control is only "empty" when no numeric value is set at all.
|
|
123
|
-
*/
|
|
124
|
-
get empty() {
|
|
125
|
-
return Number.isNaN(this.#value);
|
|
126
|
-
}
|
|
127
|
-
get shouldLabelFloat() {
|
|
128
|
-
return this.focused || !this.empty;
|
|
129
|
-
}
|
|
130
|
-
get errorState() {
|
|
131
|
-
const requiredUnset = this.empty && this.#required && this.touched;
|
|
132
|
-
const ngControlError = this.ngControl?.errors != null;
|
|
133
|
-
const externalError = (this.errors?.length ?? 0) > 0 && this.touched;
|
|
134
|
-
return requiredUnset || ngControlError || externalError;
|
|
135
|
-
}
|
|
136
|
-
/** Resolved display value shown in the live readout. */
|
|
137
|
-
get displayValue() {
|
|
138
|
-
return String(this.formatLabel(this.#value));
|
|
139
|
-
}
|
|
140
|
-
setDescribedByIds(ids) {
|
|
141
|
-
this.describedBy = ids.join(' ');
|
|
142
|
-
this.stateChanges.next();
|
|
143
|
-
}
|
|
144
|
-
onContainerClick() {
|
|
145
|
-
this.markAsTouched();
|
|
146
|
-
if (!this.focused) {
|
|
147
|
-
this.focused = true;
|
|
148
|
-
}
|
|
149
|
-
this.stateChanges.next();
|
|
150
|
-
}
|
|
151
|
-
markAsTouched() {
|
|
152
|
-
if (!this.touched) {
|
|
153
|
-
this.touched = true;
|
|
154
|
-
this.onTouched();
|
|
155
|
-
this.stateChanges.next();
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
valueChangedSlider(event) {
|
|
159
|
-
const target = event.target;
|
|
160
|
-
if (!(target instanceof HTMLInputElement)) {
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
const next = Number(target.value);
|
|
164
|
-
if (Number.isNaN(next)) {
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
this.value = next;
|
|
168
|
-
this.markAsTouched();
|
|
169
|
-
this.valueChange.emit(next);
|
|
170
|
-
}
|
|
171
|
-
/** Coerce an incoming binding to a finite number, falling back when invalid. */
|
|
172
|
-
#toNumber(value, fallback) {
|
|
173
|
-
const parsed = Number(value);
|
|
174
|
-
return Number.isFinite(parsed) ? parsed : fallback;
|
|
175
|
-
}
|
|
176
|
-
static { this.ɵfac = function MatSliderEditorComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MatSliderEditorComponent)(); }; }
|
|
177
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MatSliderEditorComponent, selectors: [["lib-mat-slider-editor"]], hostAttrs: [1, "lib-mat-slider-editor"], hostVars: 6, hostBindings: function MatSliderEditorComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
178
|
-
i0.ɵɵdomProperty("id", ctx.id);
|
|
179
|
-
i0.ɵɵattribute("aria-describedby", ctx.describedBy);
|
|
180
|
-
i0.ɵɵclassProp("lib-mat-slider-editor--focused", ctx.focused)("lib-mat-slider-editor--disabled", ctx.disabled);
|
|
181
|
-
} }, inputs: { errors: "errors", label: "label", format: "format", formatLabel: "formatLabel", min: "min", max: "max", step: "step", disabled: "disabled", value: "value", required: "required" }, outputs: { valueChange: "valueChange" }, features: [i0.ɵɵProvidersFeature([{ provide: MatFormFieldControl, useExisting: MatSliderEditorComponent }])], decls: 9, vars: 10, consts: [[1, "lib-mat-slider-editor__row"], [1, "lib-mat-slider-editor__bound"], ["discrete", "", "showTickMarks", "", 1, "lib-mat-slider-editor__slider", 3, "disabled", "min", "max", "step", "displayWith"], ["matSliderThumb", "", 3, "input", "blur", "value"], [1, "lib-mat-slider-editor__value"]], template: function MatSliderEditorComponent_Template(rf, ctx) { if (rf & 1) {
|
|
182
|
-
i0.ɵɵelementStart(0, "div", 0)(1, "span", 1);
|
|
183
|
-
i0.ɵɵtext(2);
|
|
184
|
-
i0.ɵɵelementEnd();
|
|
185
|
-
i0.ɵɵelementStart(3, "mat-slider", 2)(4, "input", 3);
|
|
186
|
-
i0.ɵɵlistener("input", function MatSliderEditorComponent_Template_input_input_4_listener($event) { return ctx.valueChangedSlider($event); })("blur", function MatSliderEditorComponent_Template_input_blur_4_listener() { return ctx.markAsTouched(); });
|
|
187
|
-
i0.ɵɵelementEnd()();
|
|
188
|
-
i0.ɵɵelementStart(5, "span", 1);
|
|
189
|
-
i0.ɵɵtext(6);
|
|
190
|
-
i0.ɵɵelementEnd()();
|
|
191
|
-
i0.ɵɵelementStart(7, "output", 4);
|
|
192
|
-
i0.ɵɵtext(8);
|
|
193
|
-
i0.ɵɵelementEnd();
|
|
194
|
-
} if (rf & 2) {
|
|
195
|
-
i0.ɵɵadvance(2);
|
|
196
|
-
i0.ɵɵtextInterpolate(ctx.min);
|
|
197
|
-
i0.ɵɵadvance();
|
|
198
|
-
i0.ɵɵproperty("disabled", ctx.disabled)("min", ctx.min)("max", ctx.max)("step", ctx.step)("displayWith", ctx.displayWith);
|
|
199
|
-
i0.ɵɵadvance();
|
|
200
|
-
i0.ɵɵproperty("value", ctx.value);
|
|
201
|
-
i0.ɵɵattribute("aria-label", ctx.label || null);
|
|
202
|
-
i0.ɵɵadvance(2);
|
|
203
|
-
i0.ɵɵtextInterpolate(ctx.max);
|
|
204
|
-
i0.ɵɵadvance(2);
|
|
205
|
-
i0.ɵɵtextInterpolate(ctx.displayValue);
|
|
206
|
-
} }, dependencies: [MatSliderModule, i1.MatSlider, i1.MatSliderThumb], styles: ["[_nghost-%COMP%]{display:block}.lib-mat-slider-editor__row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem}.lib-mat-slider-editor__slider[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.lib-mat-slider-editor__bound[_ngcontent-%COMP%]{flex:0 0 auto;font-size:.8125rem;color:var(--lib-forms-on-surface-variant);font-variant-numeric:tabular-nums}.lib-mat-slider-editor__value[_ngcontent-%COMP%]{display:block;margin-top:.5rem;font-size:.9375rem;font-weight:500;color:var(--lib-forms-on-surface);font-variant-numeric:tabular-nums;transition:color var(--lib-forms-duration-hover) var(--lib-forms-easing)}.lib-mat-slider-editor--focused[_nghost-%COMP%] .lib-mat-slider-editor__value[_ngcontent-%COMP%]{color:var(--lib-forms-primary)}.lib-mat-slider-editor--disabled[_nghost-%COMP%]{opacity:.55;pointer-events:none}"], changeDetection: 0 }); }
|
|
207
|
-
}
|
|
208
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MatSliderEditorComponent, [{
|
|
209
|
-
type: Component,
|
|
210
|
-
args: [{ selector: 'lib-mat-slider-editor', providers: [{ provide: MatFormFieldControl, useExisting: MatSliderEditorComponent }], imports: [MatSliderModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: {
|
|
211
|
-
'class': 'lib-mat-slider-editor',
|
|
212
|
-
'[id]': 'id',
|
|
213
|
-
'[attr.aria-describedby]': 'describedBy',
|
|
214
|
-
'[class.lib-mat-slider-editor--focused]': 'focused',
|
|
215
|
-
'[class.lib-mat-slider-editor--disabled]': 'disabled',
|
|
216
|
-
}, template: "<div class=\"lib-mat-slider-editor__row\">\n <span class=\"lib-mat-slider-editor__bound\">{{ min }}</span>\n\n <mat-slider\n class=\"lib-mat-slider-editor__slider\"\n discrete\n showTickMarks\n [disabled]=\"disabled\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [displayWith]=\"displayWith\"\n >\n <input\n matSliderThumb\n [value]=\"value\"\n [attr.aria-label]=\"label || null\"\n (input)=\"valueChangedSlider($event)\"\n (blur)=\"markAsTouched()\"\n />\n </mat-slider>\n\n <span class=\"lib-mat-slider-editor__bound\">{{ max }}</span>\n</div>\n\n<output class=\"lib-mat-slider-editor__value\">{{ displayValue }}</output>\n", styles: [":host{display:block}.lib-mat-slider-editor__row{display:flex;align-items:center;gap:.75rem}.lib-mat-slider-editor__slider{flex:1 1 auto;min-width:0}.lib-mat-slider-editor__bound{flex:0 0 auto;font-size:.8125rem;color:var(--lib-forms-on-surface-variant);font-variant-numeric:tabular-nums}.lib-mat-slider-editor__value{display:block;margin-top:.5rem;font-size:.9375rem;font-weight:500;color:var(--lib-forms-on-surface);font-variant-numeric:tabular-nums;transition:color var(--lib-forms-duration-hover) var(--lib-forms-easing)}:host(.lib-mat-slider-editor--focused) .lib-mat-slider-editor__value{color:var(--lib-forms-primary)}:host(.lib-mat-slider-editor--disabled){opacity:.55;pointer-events:none}\n"] }]
|
|
217
|
-
}], null, { errors: [{
|
|
218
|
-
type: Input
|
|
219
|
-
}], label: [{
|
|
220
|
-
type: Input
|
|
221
|
-
}], format: [{
|
|
222
|
-
type: Input
|
|
223
|
-
}], formatLabel: [{
|
|
224
|
-
type: Input
|
|
225
|
-
}], min: [{
|
|
226
|
-
type: Input
|
|
227
|
-
}], max: [{
|
|
228
|
-
type: Input
|
|
229
|
-
}], step: [{
|
|
230
|
-
type: Input
|
|
231
|
-
}], disabled: [{
|
|
232
|
-
type: Input
|
|
233
|
-
}], value: [{
|
|
234
|
-
type: Input
|
|
235
|
-
}], required: [{
|
|
236
|
-
type: Input
|
|
237
|
-
}], valueChange: [{ type: i0.Output, args: ["valueChange"] }] }); })();
|
|
238
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MatSliderEditorComponent, { className: "MatSliderEditorComponent", filePath: "lib/components/t-dynamic-data-edit/elements/mat-slider-editor/mat-slider-editor.component.ts", lineNumber: 49 }); })();
|
|
239
|
-
|
|
240
|
-
export { MatSliderEditorComponent };
|
|
241
|
-
//# sourceMappingURL=ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mat-slider-editor/mat-slider-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mat-slider-editor/mat-slider-editor.component.html"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n Input,\n ViewEncapsulation,\n inject,\n output,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { MatSliderModule } from '@angular/material/slider';\nimport { Subject } from 'rxjs';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\n\n/** Display formatter for a slider value (thumb tooltip / value readout). */\nexport type SliderValueFormatter = (value: number) => string | number;\n\n/**\n * Internal Material slider editor implementing `MatFormFieldControl<number>`\n * for the dynamic-data-edit configuration surface.\n *\n * Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,\n * hint, and validation errors — so this component owns only the slider track,\n * the live value readout, and the min/max bound labels.\n *\n * NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /\n * `required` / `placeholder` / `id` members, `@Input()` decorators, the\n * `focused` / `touched` / `stateChanges` members, and the `useExisting`\n * provider. These are framework wiring, not defects — the CLAUDE.md bans on\n * `@Input()` / `useExisting` do not apply to MatFormFieldControl integration.\n */\n@Component({\n selector: 'lib-mat-slider-editor',\n providers: [{ provide: MatFormFieldControl, useExisting: MatSliderEditorComponent }],\n imports: [MatSliderModule],\n templateUrl: './mat-slider-editor.component.html',\n styleUrl: './mat-slider-editor.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n 'class': 'lib-mat-slider-editor',\n '[id]': 'id',\n '[attr.aria-describedby]': 'describedBy',\n '[class.lib-mat-slider-editor--focused]': 'focused',\n '[class.lib-mat-slider-editor--disabled]': 'disabled',\n },\n})\nexport class MatSliderEditorComponent implements MatFormFieldControl<number> {\n static nextId = 0;\n\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'lib-mat-slider-editor';\n\n id = `lib-mat-slider-editor-${MatSliderEditorComponent.nextId++}`;\n placeholder = '';\n focused = false;\n touched = false;\n describedBy = '';\n autofilled = false;\n userAriaDescribedBy: string | undefined = undefined;\n disableAutomaticLabeling: boolean | undefined = undefined;\n\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n /** Validation errors surfaced by the parent for error-state derivation. */\n @Input() errors: IConfigElementError[] | undefined = [];\n /** Accessible label for the slider thumb. */\n @Input() label = '';\n /** Thumb-tooltip formatter (Material `displayWith`). Optional — the parent's editor config may supply `undefined`. */\n @Input() format: SliderValueFormatter | undefined = (value: number) => value;\n /** Fallback formatter used by the value readout when `format` is absent. */\n @Input() formatLabel: SliderValueFormatter = (value: number) => value;\n\n #min = 0;\n /** Lower bound of the slider. */\n @Input()\n get min(): number {\n return this.#min;\n }\n set min(value: number) {\n this.#min = this.#toNumber(value, 0);\n this.stateChanges.next();\n }\n\n #max = 100;\n /** Upper bound of the slider. */\n @Input()\n get max(): number {\n return this.#max;\n }\n set max(value: number) {\n this.#max = this.#toNumber(value, 100);\n this.stateChanges.next();\n }\n\n #step = 1;\n /** Increment between selectable values; also drives tick-mark spacing. */\n @Input()\n get step(): number {\n return this.#step;\n }\n set step(value: number) {\n this.#step = this.#toNumber(value, 1);\n this.stateChanges.next();\n }\n\n #disabled = false;\n /** Whether the slider is inert. */\n @Input()\n get disabled(): boolean {\n return this.#disabled;\n }\n set disabled(value: boolean) {\n this.#disabled = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n #value = 0;\n /** Current numeric value of the slider. */\n @Input()\n get value(): number {\n return this.#value;\n }\n set value(value: number) {\n this.#value = this.#toNumber(value, 0);\n this.stateChanges.next();\n }\n\n #required = false;\n /** Whether a value is required. */\n @Input()\n get required(): boolean {\n return this.#required;\n }\n set required(value: boolean) {\n this.#required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n /** Emits the new slider value when the user drags the thumb. */\n readonly valueChange = output<number>();\n\n // MatFormFieldControl reads these as plain getters during its own change\n // detection, so they stay getters rather than `computed()` signals.\n\n /**\n * Whether the control holds no user selection.\n *\n * BEHAVIOUR FLAG: a value of `0` is a real selection, so it is NOT empty.\n * The control is only \"empty\" when no numeric value is set at all.\n */\n get empty(): boolean {\n return Number.isNaN(this.#value);\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get errorState(): boolean {\n const requiredUnset = this.empty && this.#required && this.touched;\n const ngControlError = this.ngControl?.errors != null;\n const externalError = (this.errors?.length ?? 0) > 0 && this.touched;\n return requiredUnset || ngControlError || externalError;\n }\n\n /** Resolved display value shown in the live readout. */\n get displayValue(): string {\n return String(this.formatLabel(this.#value));\n }\n\n /**\n * Adapter for Material's `displayWith`, which requires a `string` return.\n * Wraps the `format` thumb-tooltip formatter.\n */\n readonly displayWith = (value: number): string =>\n String(this.format ? this.format(value) : value);\n\n setDescribedByIds(ids: string[]): void {\n this.describedBy = ids.join(' ');\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n this.markAsTouched();\n if (!this.focused) {\n this.focused = true;\n }\n this.stateChanges.next();\n }\n\n onTouched: () => void = () => {};\n\n markAsTouched(): void {\n if (!this.touched) {\n this.touched = true;\n this.onTouched();\n this.stateChanges.next();\n }\n }\n\n valueChangedSlider(event: Event): void {\n const target = event.target;\n if (!(target instanceof HTMLInputElement)) {\n return;\n }\n const next = Number(target.value);\n if (Number.isNaN(next)) {\n return;\n }\n this.value = next;\n this.markAsTouched();\n this.valueChange.emit(next);\n }\n\n /** Coerce an incoming binding to a finite number, falling back when invalid. */\n #toNumber(value: number, fallback: number): number {\n const parsed = Number(value);\n return Number.isFinite(parsed) ? parsed : fallback;\n }\n}\n","<div class=\"lib-mat-slider-editor__row\">\n <span class=\"lib-mat-slider-editor__bound\">{{ min }}</span>\n\n <mat-slider\n class=\"lib-mat-slider-editor__slider\"\n discrete\n showTickMarks\n [disabled]=\"disabled\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [displayWith]=\"displayWith\"\n >\n <input\n matSliderThumb\n [value]=\"value\"\n [attr.aria-label]=\"label || null\"\n (input)=\"valueChangedSlider($event)\"\n (blur)=\"markAsTouched()\"\n />\n </mat-slider>\n\n <span class=\"lib-mat-slider-editor__bound\">{{ max }}</span>\n</div>\n\n<output class=\"lib-mat-slider-editor__value\">{{ displayValue }}</output>\n"],"names":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B,EAAE,WAAW,EAAA,wBAA0B,EAAE,CAAC,WAC3E,CAAC,eAAe,CAAC,EAAA,eAAA,EAGT,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,oBAAA,OAAO,EAAE,uBAAuB;AAChC,oBAAA,MAAM,EAAE,IAAI;AACZ,oBAAA,yBAAyB,EAAE,aAAa;AACxC,oBAAA,wCAAwC,EAAE,SAAS;AACnD,oBAAA,yCAAyC,EAAE,UAAU;AACtD,iBAAA,EAAA,QAAA,EAAA,srBAAA,EAAA,MAAA,EAAA,CAAA,4rBAAA,CAAA,EAAA;;kBAqBA;;kBAEA;;kBAEA;;kBAEA;;kBAIA;;kBAWA;;kBAWA;;kBAWA;;kBAWA;;kBAWA;;kFApFU,wBAAwB,EAAA,EAAA,SAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,8FAAA,EAAA,UAAA,EAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,GAAA;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mat-slider-editor/mat-slider-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mat-slider-editor/mat-slider-editor.component.html"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n Input,\n ViewEncapsulation,\n inject,\n output,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { MatSliderModule } from '@angular/material/slider';\nimport { Subject } from 'rxjs';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\n\n/** Display formatter for a slider value (thumb tooltip / value readout). */\nexport type SliderValueFormatter = (value: number) => string | number;\n\n/**\n * Internal Material slider editor implementing `MatFormFieldControl<number>`\n * for the dynamic-data-edit configuration surface.\n *\n * Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,\n * hint, and validation errors — so this component owns only the slider track,\n * the live value readout, and the min/max bound labels.\n *\n * NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /\n * `required` / `placeholder` / `id` members, `@Input()` decorators, the\n * `focused` / `touched` / `stateChanges` members, and the `useExisting`\n * provider. These are framework wiring, not defects — the CLAUDE.md bans on\n * `@Input()` / `useExisting` do not apply to MatFormFieldControl integration.\n */\n@Component({\n selector: 'lib-mat-slider-editor',\n providers: [{ provide: MatFormFieldControl, useExisting: MatSliderEditorComponent }],\n imports: [MatSliderModule],\n templateUrl: './mat-slider-editor.component.html',\n styleUrl: './mat-slider-editor.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n 'class': 'lib-mat-slider-editor',\n '[id]': 'id',\n '[attr.aria-describedby]': 'describedBy',\n '[class.lib-mat-slider-editor--focused]': 'focused',\n '[class.lib-mat-slider-editor--disabled]': 'disabled',\n },\n})\nexport class MatSliderEditorComponent implements MatFormFieldControl<number> {\n static nextId = 0;\n\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'lib-mat-slider-editor';\n\n id = `lib-mat-slider-editor-${MatSliderEditorComponent.nextId++}`;\n placeholder = '';\n focused = false;\n touched = false;\n describedBy = '';\n autofilled = false;\n userAriaDescribedBy: string | undefined = undefined;\n disableAutomaticLabeling: boolean | undefined = undefined;\n\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n /** Validation errors surfaced by the parent for error-state derivation. */\n @Input() errors: IConfigElementError[] | undefined = [];\n /** Accessible label for the slider thumb. */\n @Input() label = '';\n /** Thumb-tooltip formatter (Material `displayWith`). Optional — the parent's editor config may supply `undefined`. */\n @Input() format: SliderValueFormatter | undefined = (value: number) => value;\n /** Fallback formatter used by the value readout when `format` is absent. */\n @Input() formatLabel: SliderValueFormatter = (value: number) => value;\n\n #min = 0;\n /** Lower bound of the slider. */\n @Input()\n get min(): number {\n return this.#min;\n }\n set min(value: number) {\n this.#min = this.#toNumber(value, 0);\n this.stateChanges.next();\n }\n\n #max = 100;\n /** Upper bound of the slider. */\n @Input()\n get max(): number {\n return this.#max;\n }\n set max(value: number) {\n this.#max = this.#toNumber(value, 100);\n this.stateChanges.next();\n }\n\n #step = 1;\n /** Increment between selectable values; also drives tick-mark spacing. */\n @Input()\n get step(): number {\n return this.#step;\n }\n set step(value: number) {\n this.#step = this.#toNumber(value, 1);\n this.stateChanges.next();\n }\n\n #disabled = false;\n /** Whether the slider is inert. */\n @Input()\n get disabled(): boolean {\n return this.#disabled;\n }\n set disabled(value: boolean) {\n this.#disabled = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n #value = 0;\n /** Current numeric value of the slider. */\n @Input()\n get value(): number {\n return this.#value;\n }\n set value(value: number) {\n this.#value = this.#toNumber(value, 0);\n this.stateChanges.next();\n }\n\n #required = false;\n /** Whether a value is required. */\n @Input()\n get required(): boolean {\n return this.#required;\n }\n set required(value: boolean) {\n this.#required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n /** Emits the new slider value when the user drags the thumb. */\n readonly valueChange = output<number>();\n\n // MatFormFieldControl reads these as plain getters during its own change\n // detection, so they stay getters rather than `computed()` signals.\n\n /**\n * Whether the control holds no user selection.\n *\n * BEHAVIOUR FLAG: a value of `0` is a real selection, so it is NOT empty.\n * The control is only \"empty\" when no numeric value is set at all.\n */\n get empty(): boolean {\n return Number.isNaN(this.#value);\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get errorState(): boolean {\n const requiredUnset = this.empty && this.#required && this.touched;\n const ngControlError = this.ngControl?.errors != null;\n const externalError = (this.errors?.length ?? 0) > 0 && this.touched;\n return requiredUnset || ngControlError || externalError;\n }\n\n /** Resolved display value shown in the live readout. */\n get displayValue(): string {\n return String(this.formatLabel(this.#value));\n }\n\n /**\n * Adapter for Material's `displayWith`, which requires a `string` return.\n * Wraps the `format` thumb-tooltip formatter.\n */\n readonly displayWith = (value: number): string =>\n String(this.format ? this.format(value) : value);\n\n setDescribedByIds(ids: string[]): void {\n this.describedBy = ids.join(' ');\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n this.markAsTouched();\n if (!this.focused) {\n this.focused = true;\n }\n this.stateChanges.next();\n }\n\n onTouched: () => void = () => {};\n\n markAsTouched(): void {\n if (!this.touched) {\n this.touched = true;\n this.onTouched();\n this.stateChanges.next();\n }\n }\n\n valueChangedSlider(event: Event): void {\n const target = event.target;\n if (!(target instanceof HTMLInputElement)) {\n return;\n }\n const next = Number(target.value);\n if (Number.isNaN(next)) {\n return;\n }\n this.value = next;\n this.markAsTouched();\n this.valueChange.emit(next);\n }\n\n /** Coerce an incoming binding to a finite number, falling back when invalid. */\n #toNumber(value: number, fallback: number): number {\n const parsed = Number(value);\n return Number.isFinite(parsed) ? parsed : fallback;\n }\n}\n","<div class=\"lib-mat-slider-editor__row\">\n <span class=\"lib-mat-slider-editor__bound\">{{ min }}</span>\n\n <mat-slider\n class=\"lib-mat-slider-editor__slider\"\n discrete\n showTickMarks\n [disabled]=\"disabled\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [displayWith]=\"displayWith\"\n >\n <input\n matSliderThumb\n [value]=\"value\"\n [attr.aria-label]=\"label || null\"\n (input)=\"valueChangedSlider($event)\"\n (blur)=\"markAsTouched()\"\n />\n </mat-slider>\n\n <span class=\"lib-mat-slider-editor__bound\">{{ max }}</span>\n</div>\n\n<output class=\"lib-mat-slider-editor__value\">{{ displayValue }}</output>\n"],"names":[],"mappings":";;;;;;;;;AAkBA;;;;;;;;;;;;;AAaG;MAiBU,wBAAwB,CAAA;AAhBrC,IAAA,WAAA,GAAA;;AAoBW,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QAClC,IAAA,CAAA,WAA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A,EACtB,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,wBAA0B,EAAE,CAAC,WAC3E,CAAC,eAAe,CAAC,EAAA,eAAA,EAGT,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,OAAO,EAAE,uBAAuB;AAChC,wBAAA,MAAM,EAAE,IAAI;AACZ,wBAAA,yBAAyB,EAAE,aAAa;AACxC,wBAAA,wCAAwC,EAAE,SAAS;AACnD,wBAAA,yCAAyC,EAAE,UAAU;AACtD,qBAAA,EAAA,QAAA,EAAA,srBAAA,EAAA,MAAA,EAAA,CAAA,4rBAAA,CAAA,EAAA;;sBAqBA;;sBAEA;;sBAEA;;sBAEA;;sBAIA;;sBAWA;;sBAWA;;sBAWA;;sBAWA;;sBAWA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mat-slider-toggle-editor/mat-slider-toggle-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mat-slider-toggle-editor/mat-slider-toggle-editor.component.html"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n Input,\n ViewEncapsulation,\n inject,\n output,\n} from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { Subject } from 'rxjs';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\n\n// CVA write callback. Angular's ControlValueAccessor types the registered\n// change handler as `(value: any) => void`; the alias keeps the `any` contained\n// to one place instead of repeating an eslint-disable on every reference.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Angular CVA mandates an untyped change callback.\ntype CvaChange = (value: any) => void;\n\n/**\n * Internal Material slide-toggle editor implementing\n * `MatFormFieldControl<boolean>` and `ControlValueAccessor`.\n *\n * Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,\n * hint, and validation errors — so this component owns only the toggle itself\n * (and the inline caption the toggle carries).\n *\n * NOTE: `MatFormFieldControl<T>` and `ControlValueAccessor` mandate plain\n * mutable `value` / `placeholder` / `required` / `disabled` / `id` members,\n * `@Input()` decorators, the `focused` / `touched` / `stateChanges` /\n * `onChange` / `onTouched` members, and the `useExisting` provider. These are\n * framework wiring, not defects — the CLAUDE.md bans on `@Input()` / `useExisting`\n * do not apply to MatFormFieldControl integration.\n */\n@Component({\n selector: 'lib-mat-slider-toggle-editor',\n imports: [MatSlideToggleModule],\n templateUrl: './mat-slider-toggle-editor.component.html',\n styleUrl: './mat-slider-toggle-editor.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: MatFormFieldControl,\n useExisting: MatSliderToggleEditorComponent,\n },\n ],\n host: {\n 'class': 'lib-mat-slider-toggle-editor',\n '[id]': 'id',\n '[attr.aria-describedby]': 'describedBy',\n '[class.floating]': 'shouldLabelFloat',\n },\n})\nexport class MatSliderToggleEditorComponent\n implements MatFormFieldControl<boolean>, ControlValueAccessor\n{\n static nextId = 0;\n\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'lib-mat-slider-toggle-editor';\n\n focused = false;\n touched = false;\n autofilled = false;\n\n id = `lib-mat-slider-toggle-editor-${MatSliderToggleEditorComponent.nextId++}`;\n describedBy = '';\n\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n @Input() name: string | undefined = undefined;\n @Input() label = '';\n @Input() errors: IConfigElementError[] | undefined = [];\n @Input() disabled = false;\n\n /** Emits the new toggle state when the user flips it. */\n readonly valueChange = output<boolean>();\n\n #required = false;\n @Input()\n get required(): boolean {\n return this.#required;\n }\n set required(value: boolean) {\n this.#required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n #value = false;\n @Input()\n get value(): boolean {\n return this.#value;\n }\n set value(val: boolean) {\n this.#value = val;\n this.onChange(val);\n this.stateChanges.next();\n }\n\n #placeholder = '';\n @Input()\n get placeholder(): string {\n return this.#placeholder;\n }\n set placeholder(value: string) {\n this.#placeholder = value;\n this.stateChanges.next();\n }\n\n constructor() {\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n // MatFormFieldControl reads these as plain getters during its own change\n // detection, so they stay getters rather than `computed()` signals.\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get empty(): boolean {\n return this.#value === false;\n }\n\n get errorState(): boolean {\n return (\n (!this.#value && this.#required && this.touched) ||\n this.ngControl?.errors != null ||\n (this.errors?.length ?? 0) > 0\n );\n }\n\n // ControlValueAccessor — Angular registers an untyped change callback.\n onChange: CvaChange = () => {};\n onTouched: () => void = () => {};\n\n writeValue(value: boolean): void {\n this.#value = value;\n this.stateChanges.next();\n }\n\n registerOnChange(fn: CvaChange): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.stateChanges.next();\n }\n\n setDescribedByIds(ids: string[]): void {\n this.describedBy = ids.join(' ');\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n if (!this.focused) {\n this.focused = true;\n this.stateChanges.next();\n }\n }\n\n markAsTouched(): void {\n if (!this.touched) {\n this.touched = true;\n this.onTouched();\n this.stateChanges.next();\n }\n }\n\n valueToggleChanged(value: boolean): void {\n this.value = value;\n this.valueChange.emit(value);\n this.markAsTouched();\n }\n}\n","<mat-slide-toggle\n class=\"lib-mat-slider-toggle-editor__toggle\"\n [disabled]=\"disabled\"\n [checked]=\"!!value\"\n [required]=\"required\"\n [aria-label]=\"label || name || 'Toggle'\"\n (change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,EAAA,CAAA,EAAA,QAAA,EAAA,8BAA8B,EAAA,OAAA,EAC/B,CAAC,oBAAoB,CAAC,EAAA,eAAA,EAGd,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,mBAAmB;AAC5B,4BAAA,WAAW,EAAA,8BAAgC;AAC5C,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,OAAO,EAAE,8BAA8B;AACvC,wBAAA,MAAM,EAAE,IAAI;AACZ,wBAAA,yBAAyB,EAAE,aAAa;AACxC,wBAAA,kBAAkB,EAAE,kBAAkB;AACvC,qBAAA,EAAA,QAAA,EAAA,4TAAA,EAAA,MAAA,EAAA,CAAA,uNAAA,CAAA,EAAA;;sBAoBA;;sBACA;;sBACA;;sBACA;;sBAMA;;sBAUA;;sBAWA;;;;;"}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, output, ViewEncapsulation, ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
4
|
-
import { NgControl } from '@angular/forms';
|
|
5
|
-
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
6
|
-
import * as i1 from '@angular/material/slide-toggle';
|
|
7
|
-
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
8
|
-
import { Subject } from 'rxjs';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal Material slide-toggle editor implementing
|
|
12
|
-
* `MatFormFieldControl<boolean>` and `ControlValueAccessor`.
|
|
13
|
-
*
|
|
14
|
-
* Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,
|
|
15
|
-
* hint, and validation errors — so this component owns only the toggle itself
|
|
16
|
-
* (and the inline caption the toggle carries).
|
|
17
|
-
*
|
|
18
|
-
* NOTE: `MatFormFieldControl<T>` and `ControlValueAccessor` mandate plain
|
|
19
|
-
* mutable `value` / `placeholder` / `required` / `disabled` / `id` members,
|
|
20
|
-
* `@Input()` decorators, the `focused` / `touched` / `stateChanges` /
|
|
21
|
-
* `onChange` / `onTouched` members, and the `useExisting` provider. These are
|
|
22
|
-
* framework wiring, not defects — the CLAUDE.md bans on `@Input()` / `useExisting`
|
|
23
|
-
* do not apply to MatFormFieldControl integration.
|
|
24
|
-
*/
|
|
25
|
-
class MatSliderToggleEditorComponent {
|
|
26
|
-
static { this.nextId = 0; }
|
|
27
|
-
#required;
|
|
28
|
-
get required() {
|
|
29
|
-
return this.#required;
|
|
30
|
-
}
|
|
31
|
-
set required(value) {
|
|
32
|
-
this.#required = coerceBooleanProperty(value);
|
|
33
|
-
this.stateChanges.next();
|
|
34
|
-
}
|
|
35
|
-
#value;
|
|
36
|
-
get value() {
|
|
37
|
-
return this.#value;
|
|
38
|
-
}
|
|
39
|
-
set value(val) {
|
|
40
|
-
this.#value = val;
|
|
41
|
-
this.onChange(val);
|
|
42
|
-
this.stateChanges.next();
|
|
43
|
-
}
|
|
44
|
-
#placeholder;
|
|
45
|
-
get placeholder() {
|
|
46
|
-
return this.#placeholder;
|
|
47
|
-
}
|
|
48
|
-
set placeholder(value) {
|
|
49
|
-
this.#placeholder = value;
|
|
50
|
-
this.stateChanges.next();
|
|
51
|
-
}
|
|
52
|
-
constructor() {
|
|
53
|
-
/** Emits whenever a piece of `MatFormFieldControl` state changes. */
|
|
54
|
-
this.stateChanges = new Subject();
|
|
55
|
-
this.controlType = 'lib-mat-slider-toggle-editor';
|
|
56
|
-
this.focused = false;
|
|
57
|
-
this.touched = false;
|
|
58
|
-
this.autofilled = false;
|
|
59
|
-
this.id = `lib-mat-slider-toggle-editor-${MatSliderToggleEditorComponent.nextId++}`;
|
|
60
|
-
this.describedBy = '';
|
|
61
|
-
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
62
|
-
this.name = undefined;
|
|
63
|
-
this.label = '';
|
|
64
|
-
this.errors = [];
|
|
65
|
-
this.disabled = false;
|
|
66
|
-
/** Emits the new toggle state when the user flips it. */
|
|
67
|
-
this.valueChange = output();
|
|
68
|
-
this.#required = false;
|
|
69
|
-
this.#value = false;
|
|
70
|
-
this.#placeholder = '';
|
|
71
|
-
// ControlValueAccessor — Angular registers an untyped change callback.
|
|
72
|
-
this.onChange = () => { };
|
|
73
|
-
this.onTouched = () => { };
|
|
74
|
-
if (this.ngControl != null) {
|
|
75
|
-
this.ngControl.valueAccessor = this;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
// MatFormFieldControl reads these as plain getters during its own change
|
|
79
|
-
// detection, so they stay getters rather than `computed()` signals.
|
|
80
|
-
get shouldLabelFloat() {
|
|
81
|
-
return this.focused || !this.empty;
|
|
82
|
-
}
|
|
83
|
-
get empty() {
|
|
84
|
-
return this.#value === false;
|
|
85
|
-
}
|
|
86
|
-
get errorState() {
|
|
87
|
-
return ((!this.#value && this.#required && this.touched) ||
|
|
88
|
-
this.ngControl?.errors != null ||
|
|
89
|
-
(this.errors?.length ?? 0) > 0);
|
|
90
|
-
}
|
|
91
|
-
writeValue(value) {
|
|
92
|
-
this.#value = value;
|
|
93
|
-
this.stateChanges.next();
|
|
94
|
-
}
|
|
95
|
-
registerOnChange(fn) {
|
|
96
|
-
this.onChange = fn;
|
|
97
|
-
}
|
|
98
|
-
registerOnTouched(fn) {
|
|
99
|
-
this.onTouched = fn;
|
|
100
|
-
}
|
|
101
|
-
setDisabledState(isDisabled) {
|
|
102
|
-
this.disabled = isDisabled;
|
|
103
|
-
this.stateChanges.next();
|
|
104
|
-
}
|
|
105
|
-
setDescribedByIds(ids) {
|
|
106
|
-
this.describedBy = ids.join(' ');
|
|
107
|
-
this.stateChanges.next();
|
|
108
|
-
}
|
|
109
|
-
onContainerClick() {
|
|
110
|
-
if (!this.focused) {
|
|
111
|
-
this.focused = true;
|
|
112
|
-
this.stateChanges.next();
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
markAsTouched() {
|
|
116
|
-
if (!this.touched) {
|
|
117
|
-
this.touched = true;
|
|
118
|
-
this.onTouched();
|
|
119
|
-
this.stateChanges.next();
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
valueToggleChanged(value) {
|
|
123
|
-
this.value = value;
|
|
124
|
-
this.valueChange.emit(value);
|
|
125
|
-
this.markAsTouched();
|
|
126
|
-
}
|
|
127
|
-
static { this.ɵfac = function MatSliderToggleEditorComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MatSliderToggleEditorComponent)(); }; }
|
|
128
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MatSliderToggleEditorComponent, selectors: [["lib-mat-slider-toggle-editor"]], hostAttrs: [1, "lib-mat-slider-toggle-editor"], hostVars: 4, hostBindings: function MatSliderToggleEditorComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
129
|
-
i0.ɵɵdomProperty("id", ctx.id);
|
|
130
|
-
i0.ɵɵattribute("aria-describedby", ctx.describedBy);
|
|
131
|
-
i0.ɵɵclassProp("floating", ctx.shouldLabelFloat);
|
|
132
|
-
} }, inputs: { name: "name", label: "label", errors: "errors", disabled: "disabled", required: "required", value: "value", placeholder: "placeholder" }, outputs: { valueChange: "valueChange" }, features: [i0.ɵɵProvidersFeature([
|
|
133
|
-
{
|
|
134
|
-
provide: MatFormFieldControl,
|
|
135
|
-
useExisting: MatSliderToggleEditorComponent,
|
|
136
|
-
},
|
|
137
|
-
])], decls: 2, vars: 5, consts: [[1, "lib-mat-slider-toggle-editor__toggle", 3, "change", "blur", "disabled", "checked", "required", "aria-label"]], template: function MatSliderToggleEditorComponent_Template(rf, ctx) { if (rf & 1) {
|
|
138
|
-
i0.ɵɵelementStart(0, "mat-slide-toggle", 0);
|
|
139
|
-
i0.ɵɵlistener("change", function MatSliderToggleEditorComponent_Template_mat_slide_toggle_change_0_listener($event) { return ctx.valueToggleChanged($event.checked); })("blur", function MatSliderToggleEditorComponent_Template_mat_slide_toggle_blur_0_listener() { return ctx.markAsTouched(); });
|
|
140
|
-
i0.ɵɵtext(1);
|
|
141
|
-
i0.ɵɵelementEnd();
|
|
142
|
-
} if (rf & 2) {
|
|
143
|
-
i0.ɵɵproperty("disabled", ctx.disabled)("checked", !!ctx.value)("required", ctx.required);
|
|
144
|
-
i0.ɵɵariaProperty("aria-label", ctx.label || ctx.name || "Toggle");
|
|
145
|
-
i0.ɵɵadvance();
|
|
146
|
-
i0.ɵɵtextInterpolate1(" ", ctx.label, "\n");
|
|
147
|
-
} }, dependencies: [MatSlideToggleModule, i1.MatSlideToggle], styles: ["[_nghost-%COMP%]{display:flex;align-items:center;min-height:2.25rem}.lib-mat-slider-toggle-editor__toggle[_ngcontent-%COMP%]{--mdc-form-field-label-text-color: var(--lib-forms-on-surface);color:var(--lib-forms-on-surface);font-size:.9375rem}"], changeDetection: 0 }); }
|
|
148
|
-
}
|
|
149
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MatSliderToggleEditorComponent, [{
|
|
150
|
-
type: Component,
|
|
151
|
-
args: [{ selector: 'lib-mat-slider-toggle-editor', imports: [MatSlideToggleModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, providers: [
|
|
152
|
-
{
|
|
153
|
-
provide: MatFormFieldControl,
|
|
154
|
-
useExisting: MatSliderToggleEditorComponent,
|
|
155
|
-
},
|
|
156
|
-
], host: {
|
|
157
|
-
'class': 'lib-mat-slider-toggle-editor',
|
|
158
|
-
'[id]': 'id',
|
|
159
|
-
'[attr.aria-describedby]': 'describedBy',
|
|
160
|
-
'[class.floating]': 'shouldLabelFloat',
|
|
161
|
-
}, template: "<mat-slide-toggle\n class=\"lib-mat-slider-toggle-editor__toggle\"\n [disabled]=\"disabled\"\n [checked]=\"!!value\"\n [required]=\"required\"\n [aria-label]=\"label || name || 'Toggle'\"\n (change)=\"valueToggleChanged($event.checked)\"\n (blur)=\"markAsTouched()\"\n>\n {{ label }}\n</mat-slide-toggle>\n", styles: [":host{display:flex;align-items:center;min-height:2.25rem}.lib-mat-slider-toggle-editor__toggle{--mdc-form-field-label-text-color: var(--lib-forms-on-surface);color:var(--lib-forms-on-surface);font-size:.9375rem}\n"] }]
|
|
162
|
-
}], () => [], { name: [{
|
|
163
|
-
type: Input
|
|
164
|
-
}], label: [{
|
|
165
|
-
type: Input
|
|
166
|
-
}], errors: [{
|
|
167
|
-
type: Input
|
|
168
|
-
}], disabled: [{
|
|
169
|
-
type: Input
|
|
170
|
-
}], valueChange: [{ type: i0.Output, args: ["valueChange"] }], required: [{
|
|
171
|
-
type: Input
|
|
172
|
-
}], value: [{
|
|
173
|
-
type: Input
|
|
174
|
-
}], placeholder: [{
|
|
175
|
-
type: Input
|
|
176
|
-
}] }); })();
|
|
177
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MatSliderToggleEditorComponent, { className: "MatSliderToggleEditorComponent", filePath: "lib/components/t-dynamic-data-edit/elements/mat-slider-toggle-editor/mat-slider-toggle-editor.component.ts", lineNumber: 57 }); })();
|
|
178
|
-
|
|
179
|
-
export { MatSliderToggleEditorComponent };
|
|
180
|
-
//# sourceMappingURL=ngx-t-forms-mat-slider-toggle-editor.component-D0F1d1mO.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-mat-slider-toggle-editor.component-D0F1d1mO.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mat-slider-toggle-editor/mat-slider-toggle-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mat-slider-toggle-editor/mat-slider-toggle-editor.component.html"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n Input,\n ViewEncapsulation,\n inject,\n output,\n} from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { Subject } from 'rxjs';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\n\n// CVA write callback. Angular's ControlValueAccessor types the registered\n// change handler as `(value: any) => void`; the alias keeps the `any` contained\n// to one place instead of repeating an eslint-disable on every reference.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Angular CVA mandates an untyped change callback.\ntype CvaChange = (value: any) => void;\n\n/**\n * Internal Material slide-toggle editor implementing\n * `MatFormFieldControl<boolean>` and `ControlValueAccessor`.\n *\n * Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,\n * hint, and validation errors — so this component owns only the toggle itself\n * (and the inline caption the toggle carries).\n *\n * NOTE: `MatFormFieldControl<T>` and `ControlValueAccessor` mandate plain\n * mutable `value` / `placeholder` / `required` / `disabled` / `id` members,\n * `@Input()` decorators, the `focused` / `touched` / `stateChanges` /\n * `onChange` / `onTouched` members, and the `useExisting` provider. These are\n * framework wiring, not defects — the CLAUDE.md bans on `@Input()` / `useExisting`\n * do not apply to MatFormFieldControl integration.\n */\n@Component({\n selector: 'lib-mat-slider-toggle-editor',\n imports: [MatSlideToggleModule],\n templateUrl: './mat-slider-toggle-editor.component.html',\n styleUrl: './mat-slider-toggle-editor.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: MatFormFieldControl,\n useExisting: MatSliderToggleEditorComponent,\n },\n ],\n host: {\n 'class': 'lib-mat-slider-toggle-editor',\n '[id]': 'id',\n '[attr.aria-describedby]': 'describedBy',\n '[class.floating]': 'shouldLabelFloat',\n },\n})\nexport class MatSliderToggleEditorComponent\n implements MatFormFieldControl<boolean>, ControlValueAccessor\n{\n static nextId = 0;\n\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'lib-mat-slider-toggle-editor';\n\n focused = false;\n touched = false;\n autofilled = false;\n\n id = `lib-mat-slider-toggle-editor-${MatSliderToggleEditorComponent.nextId++}`;\n describedBy = '';\n\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n @Input() name: string | undefined = undefined;\n @Input() label = '';\n @Input() errors: IConfigElementError[] | undefined = [];\n @Input() disabled = false;\n\n /** Emits the new toggle state when the user flips it. */\n readonly valueChange = output<boolean>();\n\n #required = false;\n @Input()\n get required(): boolean {\n return this.#required;\n }\n set required(value: boolean) {\n this.#required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n #value = false;\n @Input()\n get value(): boolean {\n return this.#value;\n }\n set value(val: boolean) {\n this.#value = val;\n this.onChange(val);\n this.stateChanges.next();\n }\n\n #placeholder = '';\n @Input()\n get placeholder(): string {\n return this.#placeholder;\n }\n set placeholder(value: string) {\n this.#placeholder = value;\n this.stateChanges.next();\n }\n\n constructor() {\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n // MatFormFieldControl reads these as plain getters during its own change\n // detection, so they stay getters rather than `computed()` signals.\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get empty(): boolean {\n return this.#value === false;\n }\n\n get errorState(): boolean {\n return (\n (!this.#value && this.#required && this.touched) ||\n this.ngControl?.errors != null ||\n (this.errors?.length ?? 0) > 0\n );\n }\n\n // ControlValueAccessor — Angular registers an untyped change callback.\n onChange: CvaChange = () => {};\n onTouched: () => void = () => {};\n\n writeValue(value: boolean): void {\n this.#value = value;\n this.stateChanges.next();\n }\n\n registerOnChange(fn: CvaChange): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.stateChanges.next();\n }\n\n setDescribedByIds(ids: string[]): void {\n this.describedBy = ids.join(' ');\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n if (!this.focused) {\n this.focused = true;\n this.stateChanges.next();\n }\n }\n\n markAsTouched(): void {\n if (!this.touched) {\n this.touched = true;\n this.onTouched();\n this.stateChanges.next();\n }\n }\n\n valueToggleChanged(value: boolean): void {\n this.value = value;\n this.valueChange.emit(value);\n this.markAsTouched();\n }\n}\n","<mat-slide-toggle\n class=\"lib-mat-slider-toggle-editor__toggle\"\n [disabled]=\"disabled\"\n [checked]=\"!!value\"\n [required]=\"required\"\n [aria-label]=\"label || name || 'Toggle'\"\n (change)=\"valueToggleChanged($event.checked)\"\n (blur)=\"markAsTouched()\"\n>\n {{ label }}\n</mat-slide-toggle>\n"],"names":[],"mappings":";;;;;;;;;AAqBA;;;;;;;;;;;;;;AAcG;MAqBU,8BAA8B,CAAA;aAGlC,IAAA,CAAA,MAAM,GAAG,CAAH,CAAK;AAuBlB,IAAA,SAAS;AACT,IAAA,IACI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS;IACvB;IACA,IAAI,QAAQ,CAAC,KAAc,EAAA;AACzB,QAAA,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC;AAC7C,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IAC1B;AAEA,IAAA,MAAM;AACN,IAAA,IACI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,MAAM;IACpB;IACA,IAAI,KAAK,CAAC,GAAY,EAAA;AACpB,QAAA,IAAI,CAAC,MAAM,GAAG,GAAG;AACjB,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;AAClB,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IAC1B;AAEA,IAAA,YAAY;AACZ,IAAA,IACI,WAAW,GAAA;QACb,OAAO,IAAI,CAAC,YAAY;IAC1B;IACA,IAAI,WAAW,CAAC,KAAa,EAAA;AAC3B,QAAA,IAAI,CAAC,YAAY,GAAG,KAAK;AACzB,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IAC1B;AAEA,IAAA,WAAA,GAAA;;AAnDS,QAA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