ngx-t-forms 2.0.34 → 2.0.36
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-DYKniIW1.mjs → ngx-t-forms-auto-complete-input-element.component-VektEtrf.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DYKniIW1.mjs.map → ngx-t-forms-auto-complete-input-element.component-VektEtrf.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-auto-complete-input-element.component-ookGrpnN.mjs +261 -0
- package/fesm2022/ngx-t-forms-auto-complete-input-element.component-ookGrpnN.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-sAVeqJDq.mjs → ngx-t-forms-basic-input-input-element.component-C8D6DN41.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-sAVeqJDq.mjs.map → ngx-t-forms-basic-input-input-element.component-C8D6DN41.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-basic-input-input-element.component-CQVuW8z1.mjs +225 -0
- package/fesm2022/ngx-t-forms-basic-input-input-element.component-CQVuW8z1.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-8EgwXTN1.mjs +1011 -0
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-8EgwXTN1.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-DHCYc95E.mjs → ngx-t-forms-calculated-field-rules.component-B_3IbQjp.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-DHCYc95E.mjs.map → ngx-t-forms-calculated-field-rules.component-B_3IbQjp.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-B95VIBRi.mjs +136 -0
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-B95VIBRi.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-BwGlol4L.mjs → ngx-t-forms-chip-options-creator-editor.component-uTCOa48g.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-BwGlol4L.mjs.map → ngx-t-forms-chip-options-creator-editor.component-uTCOa48g.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-6fu2mXuZ.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-BX3zJs-A.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-6fu2mXuZ.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-BX3zJs-A.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Dm16WA5Y.mjs +253 -0
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Dm16WA5Y.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-data-source-picker.component-Dij1l4-7.mjs +419 -0
- package/fesm2022/ngx-t-forms-data-source-picker.component-Dij1l4-7.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-data-source-picker.component-BdFscpSi.mjs → ngx-t-forms-data-source-picker.component-z0l9WEw7.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-data-source-picker.component-BdFscpSi.mjs.map → ngx-t-forms-data-source-picker.component-z0l9WEw7.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-BakchGky.mjs → ngx-t-forms-date-picker-input-element.component-C9I8KX12.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-BakchGky.mjs.map → ngx-t-forms-date-picker-input-element.component-C9I8KX12.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-date-picker-input-element.component-D9BOhV6g.mjs +231 -0
- package/fesm2022/ngx-t-forms-date-picker-input-element.component-D9BOhV6g.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-BnCFgi6y.mjs → ngx-t-forms-date-range-picker-input-element.component-B3Z47mrO.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-BnCFgi6y.mjs.map → ngx-t-forms-date-range-picker-input-element.component-B3Z47mrO.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-BiXubnsN.mjs +333 -0
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-BiXubnsN.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-C5T_DK6w.mjs +543 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-C5T_DK6w.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-PW2XiPiH.mjs +373 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-PW2XiPiH.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-document-picker.component-B47pQxMF.mjs +1217 -0
- package/fesm2022/ngx-t-forms-document-picker.component-B47pQxMF.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-document-picker.component-Bp_PJyo4.mjs → ngx-t-forms-document-picker.component-BNQ1a96s.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-document-picker.component-Bp_PJyo4.mjs.map → ngx-t-forms-document-picker.component-BNQ1a96s.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-editor-input-element.component-Crad-MN8.mjs → ngx-t-forms-editor-input-element.component-C12fnCTM.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-editor-input-element.component-Crad-MN8.mjs.map → ngx-t-forms-editor-input-element.component-C12fnCTM.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-editor-input-element.component-DYytkGYD.mjs +447 -0
- package/fesm2022/ngx-t-forms-editor-input-element.component-DYytkGYD.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-editor-js-input.component-BQSF3142.mjs +251 -0
- package/fesm2022/ngx-t-forms-editor-js-input.component-BQSF3142.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-editor-js-input.component-IEjjoNbP.mjs → ngx-t-forms-editor-js-input.component-cxob42pE.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-editor-js-input.component-IEjjoNbP.mjs.map → ngx-t-forms-editor-js-input.component-cxob42pE.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-CzCphzUH.mjs → ngx-t-forms-file-upload-input-element.component-Bgi-chdw.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-CzCphzUH.mjs.map → ngx-t-forms-file-upload-input-element.component-Bgi-chdw.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-file-upload-input-element.component-CI4onrtp.mjs +447 -0
- package/fesm2022/ngx-t-forms-file-upload-input-element.component-CI4onrtp.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-form-input-selector.component-BysF2WY-.mjs +163 -0
- package/fesm2022/ngx-t-forms-form-input-selector.component-BysF2WY-.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-form-input-selector.component-DVyLFw6x.mjs → ngx-t-forms-form-input-selector.component-xIalL_cs.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-form-input-selector.component-DVyLFw6x.mjs.map → ngx-t-forms-form-input-selector.component-xIalL_cs.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-D5YJ5pFm.mjs → ngx-t-forms-form-json-view.component-CU1d8rGd.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-D5YJ5pFm.mjs.map → ngx-t-forms-form-json-view.component-CU1d8rGd.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-json-view.component-DpU3ZTiS.mjs +28 -0
- package/fesm2022/ngx-t-forms-form-json-view.component-DpU3ZTiS.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-form-payload-projection.component-CkH7zmdJ.mjs +291 -0
- package/fesm2022/ngx-t-forms-form-payload-projection.component-CkH7zmdJ.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-form-payload-projection.component-Ip9ewB18.mjs → ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-form-payload-projection.component-Ip9ewB18.mjs.map → ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-section-stepper.component-DqShhIBK.mjs +936 -0
- package/fesm2022/ngx-t-forms-form-section-stepper.component-DqShhIBK.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-form-section-stepper.component-tGbPKHM6.mjs +389 -0
- package/fesm2022/ngx-t-forms-form-section-stepper.component-tGbPKHM6.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-BsgtMZFM.mjs +816 -0
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-BsgtMZFM.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-DTEx6mIl.mjs → ngx-t-forms-forms-builder-menu.component-hK9C4vAa.mjs} +11 -11
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-DTEx6mIl.mjs.map → ngx-t-forms-forms-builder-menu.component-hK9C4vAa.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-geo-location.component-4vXrrAS0.mjs → ngx-t-forms-geo-location.component-ChmvJCGu.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-geo-location.component-4vXrrAS0.mjs.map → ngx-t-forms-geo-location.component-ChmvJCGu.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-geo-location.component-DfmFok8a.mjs +329 -0
- package/fesm2022/ngx-t-forms-geo-location.component-DfmFok8a.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-BbfiG8wm.mjs → ngx-t-forms-image-capture-input-element.component-BpA_P017.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-BbfiG8wm.mjs.map → ngx-t-forms-image-capture-input-element.component-BpA_P017.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-image-capture-input-element.component-DYjnaWYE.mjs +360 -0
- package/fesm2022/ngx-t-forms-image-capture-input-element.component-DYjnaWYE.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-index-D8TBBLAD.mjs → ngx-t-forms-index-D-7ZX0w7.mjs} +2 -2
- package/fesm2022/ngx-t-forms-index-D-7ZX0w7.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-index-DHloq32-.mjs +2 -0
- package/fesm2022/ngx-t-forms-index-DHloq32-.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-input-custom.component-Cv6jfrPf.mjs +128 -0
- package/fesm2022/ngx-t-forms-input-custom.component-Cv6jfrPf.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-custom.component-B855cSGR.mjs → ngx-t-forms-input-custom.component-pUshbxSM.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-input-custom.component-B855cSGR.mjs.map → ngx-t-forms-input-custom.component-pUshbxSM.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-input-editor.component-BKV6ZJx9.mjs +512 -0
- package/fesm2022/ngx-t-forms-input-editor.component-BKV6ZJx9.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-input-editor.component-CxXMETLl.mjs +190 -0
- package/fesm2022/ngx-t-forms-input-editor.component-CxXMETLl.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-C0L8Vi2y.mjs → ngx-t-forms-map-mat-options-keys-BbfC5vYI.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-C0L8Vi2y.mjs.map → ngx-t-forms-map-mat-options-keys-BbfC5vYI.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-map-mat-options-keys-epWo0lEj.mjs +132 -0
- package/fesm2022/ngx-t-forms-map-mat-options-keys-epWo0lEj.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-Bqjjgtyf.mjs +109 -0
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-Bqjjgtyf.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-D8tnMRWS.mjs → ngx-t-forms-mat-chip-list-editor.component-CuOsHNXe.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-D8tnMRWS.mjs.map → ngx-t-forms-mat-chip-list-editor.component-CuOsHNXe.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.mjs +241 -0
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-D0F1d1mO.mjs +180 -0
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-D0F1d1mO.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BgZ2Q0yu.mjs → ngx-t-forms-missing-form-configs.component-CDIajZxP.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BgZ2Q0yu.mjs.map → ngx-t-forms-missing-form-configs.component-CDIajZxP.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-missing-form-configs.component-DRAVdGfc.mjs +114 -0
- package/fesm2022/ngx-t-forms-missing-form-configs.component-DRAVdGfc.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-C9b-pNLr.mjs +69 -0
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-C9b-pNLr.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-DD13F1yS.mjs → ngx-t-forms-mscoa-chart-toolbar.component-D1ASX1mt.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-DD13F1yS.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-D1ASX1mt.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mscoa-error-display.component-DzFibbuY.mjs +200 -0
- package/fesm2022/ngx-t-forms-mscoa-error-display.component-DzFibbuY.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component--lBn-Pvd.mjs → ngx-t-forms-mscoa-segment-config.component-CjuxTqfX.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component--lBn-Pvd.mjs.map → ngx-t-forms-mscoa-segment-config.component-CjuxTqfX.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-D9KrXNS6.mjs +850 -0
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-D9KrXNS6.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-DV93x0Rr.mjs +107 -0
- package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-DV93x0Rr.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-multiple-input-input-element.component-CZHFMhL7.mjs → ngx-t-forms-multiple-input-input-element.component-BA61uQ2q.mjs} +10 -10
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BA61uQ2q.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BxQYrUJL.mjs +1665 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BxQYrUJL.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-BkTeV_AF.mjs → ngx-t-forms-ngx-t-forms-CJGAj18J.mjs} +2042 -179
- package/fesm2022/ngx-t-forms-ngx-t-forms-CJGAj18J.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-ngx-t-forms-D7kDvkTZ.mjs +27352 -0
- package/fesm2022/ngx-t-forms-ngx-t-forms-D7kDvkTZ.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-paginated-selection-table-DeY5vQti.mjs +1024 -0
- package/fesm2022/ngx-t-forms-paginated-selection-table-DeY5vQti.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-paginated-selection-table-1W6jXaKk.mjs → ngx-t-forms-paginated-selection-table-yvhqQxPV.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-paginated-selection-table-1W6jXaKk.mjs.map → ngx-t-forms-paginated-selection-table-yvhqQxPV.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-payload-template-editor.component-BzY-kX6W.mjs +234 -0
- package/fesm2022/ngx-t-forms-payload-template-editor.component-BzY-kX6W.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-payload-template-editor.component-sqY3bYiZ.mjs +203 -0
- package/fesm2022/ngx-t-forms-payload-template-editor.component-sqY3bYiZ.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-yBqYGbgL.mjs → ngx-t-forms-pipeline-generator.component-COvr1j_v.mjs} +9 -9
- package/fesm2022/ngx-t-forms-pipeline-generator.component-COvr1j_v.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-CcHgQ-MT.mjs +1126 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-CcHgQ-MT.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-record-list-manager.component-fC_S81-7.mjs → ngx-t-forms-record-list-manager.component-CY4GnAOb.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-record-list-manager.component-fC_S81-7.mjs.map → ngx-t-forms-record-list-manager.component-CY4GnAOb.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-record-list-manager.component-DuE2OdC4.mjs +545 -0
- package/fesm2022/ngx-t-forms-record-list-manager.component-DuE2OdC4.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-BWKUC8zQ.mjs +451 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-BWKUC8zQ.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-required-inputs.component-r1KNcuod.mjs → ngx-t-forms-required-inputs.component-ByBeNLXu.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-required-inputs.component-r1KNcuod.mjs.map → ngx-t-forms-required-inputs.component-ByBeNLXu.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-BEqnJqZG.mjs +625 -0
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-BEqnJqZG.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-C99RdNiP.mjs → ngx-t-forms-rest-api-call-setup.component-CkLePXoO.mjs} +61 -15
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-CkLePXoO.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-search-field.component-BGdAmzJV.mjs +72 -0
- package/fesm2022/ngx-t-forms-search-field.component-BGdAmzJV.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-section-report.component-CQR27H3a.mjs +248 -0
- package/fesm2022/ngx-t-forms-section-report.component-CQR27H3a.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-section-report.component-Cl1wrszQ.mjs → ngx-t-forms-section-report.component-mUpSxbaB.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-section-report.component-Cl1wrszQ.mjs.map → ngx-t-forms-section-report.component-mUpSxbaB.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-select-input-element.component-CLs5UkmC.mjs +408 -0
- package/fesm2022/ngx-t-forms-select-input-element.component-CLs5UkmC.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-select-input-element.component-CStVMEhv.mjs → ngx-t-forms-select-input-element.component-c7IgHdXA.mjs} +5 -5
- package/fesm2022/ngx-t-forms-select-input-element.component-c7IgHdXA.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-selection-options-editor.component-DiegTjWX.mjs +275 -0
- package/fesm2022/ngx-t-forms-selection-options-editor.component-DiegTjWX.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-BybBzePF.mjs → ngx-t-forms-selection-options-editor.component-WfuGdtvK.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-BybBzePF.mjs.map → ngx-t-forms-selection-options-editor.component-WfuGdtvK.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-CQPrr7Cz.mjs +341 -0
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-CQPrr7Cz.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-CtavFAUq.mjs → ngx-t-forms-t-workflow-picker.component-DqFMP1rZ.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-CtavFAUq.mjs.map → ngx-t-forms-t-workflow-picker.component-DqFMP1rZ.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-CVUTn20g.mjs → ngx-t-forms-textarea-input-element.component-C7H84RGw.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-CVUTn20g.mjs.map → ngx-t-forms-textarea-input-element.component-C7H84RGw.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-textarea-input-element.component-Coxr1XD7.mjs +233 -0
- package/fesm2022/ngx-t-forms-textarea-input-element.component-Coxr1XD7.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-toggle-input-element.component-BWnTeuHM.mjs +305 -0
- package/fesm2022/ngx-t-forms-toggle-input-element.component-BWnTeuHM.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-BoZvYozf.mjs → ngx-t-forms-toggle-input-element.component-Cgzg89Ug.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-BoZvYozf.mjs.map → ngx-t-forms-toggle-input-element.component-Cgzg89Ug.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-Df9wzsjg.mjs → ngx-t-forms-validators-config.component-DgIVRSvF.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-validators-config.component-Df9wzsjg.mjs.map → ngx-t-forms-validators-config.component-DgIVRSvF.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-validators-config.component-DjLB40z-.mjs +1105 -0
- package/fesm2022/ngx-t-forms-validators-config.component-DjLB40z-.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CJvbB68e.mjs → ngx-t-forms-workflow-adjudication.component-CB6qBxgr.mjs} +9 -9
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CJvbB68e.mjs.map → ngx-t-forms-workflow-adjudication.component-CB6qBxgr.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-_A3v5MxN.mjs +2923 -0
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-_A3v5MxN.mjs.map +1 -0
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/package.json +8 -2
- package/styles/_editor-mixins.scss +55 -0
- package/styles/_json-editor-syntax.scss +16 -0
- package/types/ngx-t-forms.d.ts +663 -12
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-KmfVY6sd.mjs +0 -368
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-KmfVY6sd.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-section-stepper.component-enB9ZNG7.mjs +0 -389
- package/fesm2022/ngx-t-forms-form-section-stepper.component-enB9ZNG7.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-index-D8TBBLAD.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-editor.component-DBFYZyi3.mjs +0 -193
- package/fesm2022/ngx-t-forms-input-editor.component-DBFYZyi3.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CZHFMhL7.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-BkTeV_AF.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-pipeline-generator.component-yBqYGbgL.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-C99RdNiP.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-select-input-element.component-CStVMEhv.mjs.map +0 -1
|
@@ -0,0 +1,625 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, output, inject, DestroyRef, signal, computed, effect, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { JsDataTypes, DataSources } from 'ngx-t-forms-types';
|
|
4
|
+
import { j as TreeComponent, k as convertPostmanFolderItemsToTree, _ as _isEqual, E as EmptyStateComponent, l as ErrorListComponent } from './ngx-t-forms-ngx-t-forms-D7kDvkTZ.mjs';
|
|
5
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
+
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
|
7
|
+
import { take, tap, catchError, throwError } from 'rxjs';
|
|
8
|
+
import * as i1 from '@angular/material/tree';
|
|
9
|
+
import { MatTreeModule } from '@angular/material/tree';
|
|
10
|
+
import * as i3 from '@angular/material/icon';
|
|
11
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
12
|
+
import * as i1$1 from '@angular/material/button';
|
|
13
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
14
|
+
import * as i4 from '@angular/material/progress-spinner';
|
|
15
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
16
|
+
import * as i5 from '@angular/material/tooltip';
|
|
17
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
18
|
+
import { S as SearchFieldComponent } from './ngx-t-forms-search-field.component-BGdAmzJV.mjs';
|
|
19
|
+
|
|
20
|
+
/** True when an item's own name or description contains the (already-lowercased) search text. */
|
|
21
|
+
function itemMatches(item, searchText) {
|
|
22
|
+
return ((item.name?.toLowerCase().includes(searchText) ?? false) ||
|
|
23
|
+
(item.description?.toLowerCase().includes(searchText) ?? false));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Recursively prunes a folder tree to the items relevant to `searchText`.
|
|
27
|
+
*
|
|
28
|
+
* An item is kept when it matches directly (its whole subtree is then
|
|
29
|
+
* preserved) OR when one of its descendants matches — in which case the
|
|
30
|
+
* ancestor folder is preserved but its children are pruned to only the
|
|
31
|
+
* matching branches. This fixes the legacy defect where ancestor folders of a
|
|
32
|
+
* deep match were dropped (or whole sibling subtrees were retained).
|
|
33
|
+
*/
|
|
34
|
+
function pruneItems(items, searchText) {
|
|
35
|
+
if (!items) {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
return items.reduce((kept, item) => {
|
|
39
|
+
if (itemMatches(item, searchText)) {
|
|
40
|
+
// Direct hit: keep the item and its full subtree intact.
|
|
41
|
+
kept.push(item);
|
|
42
|
+
return kept;
|
|
43
|
+
}
|
|
44
|
+
const matchingChildren = pruneItems(item.item, searchText);
|
|
45
|
+
if (matchingChildren.length > 0) {
|
|
46
|
+
// Ancestor of a match: keep the folder but only the matching branches.
|
|
47
|
+
kept.push({ ...item, item: matchingChildren });
|
|
48
|
+
}
|
|
49
|
+
return kept;
|
|
50
|
+
}, []);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Filters a fetched Postman collection by a free-text search key, preserving
|
|
54
|
+
* the ancestor folders of every match. An empty/whitespace key returns the
|
|
55
|
+
* full set of top-level items unchanged.
|
|
56
|
+
*/
|
|
57
|
+
function filterCollectionItems(collections, searchKey) {
|
|
58
|
+
const items = collections.collection.item;
|
|
59
|
+
const searchText = searchKey.trim().toLowerCase();
|
|
60
|
+
if (!searchText) {
|
|
61
|
+
return items;
|
|
62
|
+
}
|
|
63
|
+
return pruneItems(items, searchText);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Maps an HTTP method to its design-token CSS colour value.
|
|
68
|
+
*
|
|
69
|
+
* Returns a `var(--lib-forms-method-*)` reference (dark-mode safe, no hex /
|
|
70
|
+
* named colours) so the tree can colour-code endpoints. Unknown methods fall
|
|
71
|
+
* back to `currentColor`. Matching is case-insensitive.
|
|
72
|
+
*/
|
|
73
|
+
function methodColor(method) {
|
|
74
|
+
switch (method.toUpperCase()) {
|
|
75
|
+
case 'GET':
|
|
76
|
+
return 'var(--lib-forms-method-get)';
|
|
77
|
+
case 'POST':
|
|
78
|
+
return 'var(--lib-forms-method-post)';
|
|
79
|
+
case 'PUT':
|
|
80
|
+
return 'var(--lib-forms-method-put)';
|
|
81
|
+
case 'PATCH':
|
|
82
|
+
return 'var(--lib-forms-method-patch)';
|
|
83
|
+
case 'DELETE':
|
|
84
|
+
return 'var(--lib-forms-method-delete)';
|
|
85
|
+
default:
|
|
86
|
+
return 'currentColor';
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function PostmanCollectionsComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
91
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
92
|
+
i0.ɵɵelement(1, "mat-spinner", 1);
|
|
93
|
+
i0.ɵɵelementEnd();
|
|
94
|
+
} }
|
|
95
|
+
function PostmanCollectionsComponent_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
96
|
+
i0.ɵɵelement(0, "lib-empty-state", 3);
|
|
97
|
+
} if (rf & 2) {
|
|
98
|
+
i0.ɵɵproperty("message", ctx.message);
|
|
99
|
+
} }
|
|
100
|
+
function PostmanCollectionsComponent_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
101
|
+
i0.ɵɵelement(0, "lib-empty-state", 4);
|
|
102
|
+
} if (rf & 2) {
|
|
103
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
104
|
+
i0.ɵɵproperty("message", ctx_r1.searchKey() ? "No endpoints match your search" : "No endpoints in this collection");
|
|
105
|
+
} }
|
|
106
|
+
function PostmanCollectionsComponent_Conditional_1_Conditional_3_mat_tree_node_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
107
|
+
i0.ɵɵelement(0, "mat-spinner", 9);
|
|
108
|
+
} }
|
|
109
|
+
function PostmanCollectionsComponent_Conditional_1_Conditional_3_mat_tree_node_1_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
110
|
+
i0.ɵɵelement(0, "div", 12);
|
|
111
|
+
} if (rf & 2) {
|
|
112
|
+
const line_r3 = ctx.$implicit;
|
|
113
|
+
i0.ɵɵstyleProp("left", line_r3 * 40 + 8, "px");
|
|
114
|
+
} }
|
|
115
|
+
function PostmanCollectionsComponent_Conditional_1_Conditional_3_mat_tree_node_1_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
116
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
117
|
+
i0.ɵɵelementStart(0, "button", 13);
|
|
118
|
+
i0.ɵɵlistener("click", function PostmanCollectionsComponent_Conditional_1_Conditional_3_mat_tree_node_1_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const node_r5 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.selectNode(node_r5.value)); });
|
|
119
|
+
i0.ɵɵelementStart(1, "span", 14);
|
|
120
|
+
i0.ɵɵtext(2);
|
|
121
|
+
i0.ɵɵelementEnd();
|
|
122
|
+
i0.ɵɵelementStart(3, "span");
|
|
123
|
+
i0.ɵɵtext(4);
|
|
124
|
+
i0.ɵɵelementEnd()();
|
|
125
|
+
} if (rf & 2) {
|
|
126
|
+
const request_r6 = ctx;
|
|
127
|
+
const node_r5 = i0.ɵɵnextContext().$implicit;
|
|
128
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
129
|
+
i0.ɵɵproperty("disabled", !(request_r6.body == null ? null : request_r6.body.raw) && request_r6.method === "POST" || !(request_r6.url == null ? null : request_r6.url.raw))("matTooltip", (request_r6.url == null ? null : request_r6.url.raw) || "Invalid Postman config, missing Endpoint URL");
|
|
130
|
+
i0.ɵɵadvance();
|
|
131
|
+
i0.ɵɵstyleProp("color", ctx_r1.methodColor(request_r6.method));
|
|
132
|
+
i0.ɵɵadvance();
|
|
133
|
+
i0.ɵɵtextInterpolate1(" ", request_r6.method, " ");
|
|
134
|
+
i0.ɵɵadvance(2);
|
|
135
|
+
i0.ɵɵtextInterpolate(node_r5.key);
|
|
136
|
+
} }
|
|
137
|
+
function PostmanCollectionsComponent_Conditional_1_Conditional_3_mat_tree_node_1_Template(rf, ctx) { if (rf & 1) {
|
|
138
|
+
i0.ɵɵelementStart(0, "mat-tree-node", 8);
|
|
139
|
+
i0.ɵɵconditionalCreate(1, PostmanCollectionsComponent_Conditional_1_Conditional_3_mat_tree_node_1_Conditional_1_Template, 1, 0, "mat-spinner", 9);
|
|
140
|
+
i0.ɵɵrepeaterCreate(2, PostmanCollectionsComponent_Conditional_1_Conditional_3_mat_tree_node_1_For_3_Template, 1, 2, "div", 10, i0.ɵɵrepeaterTrackByIdentity);
|
|
141
|
+
i0.ɵɵconditionalCreate(4, PostmanCollectionsComponent_Conditional_1_Conditional_3_mat_tree_node_1_Conditional_4_Template, 5, 6, "button", 11);
|
|
142
|
+
i0.ɵɵelementEnd();
|
|
143
|
+
} if (rf & 2) {
|
|
144
|
+
let tmp_6_0;
|
|
145
|
+
const node_r5 = ctx.$implicit;
|
|
146
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
147
|
+
i0.ɵɵadvance();
|
|
148
|
+
i0.ɵɵconditional(ctx_r1.isEndpointLoading(node_r5.value.id) ? 1 : -1);
|
|
149
|
+
i0.ɵɵadvance();
|
|
150
|
+
i0.ɵɵrepeater(ctx_r1.getNodeLines(node_r5.level));
|
|
151
|
+
i0.ɵɵadvance(2);
|
|
152
|
+
i0.ɵɵconditional((tmp_6_0 = node_r5.value == null ? null : node_r5.value.request) ? 4 : -1, tmp_6_0);
|
|
153
|
+
} }
|
|
154
|
+
function PostmanCollectionsComponent_Conditional_1_Conditional_3_mat_tree_node_2_Template(rf, ctx) { if (rf & 1) {
|
|
155
|
+
i0.ɵɵelementStart(0, "mat-tree-node", 8)(1, "button", 15)(2, "mat-icon");
|
|
156
|
+
i0.ɵɵtext(3);
|
|
157
|
+
i0.ɵɵelementEnd()();
|
|
158
|
+
i0.ɵɵelementStart(4, "mat-icon", 16);
|
|
159
|
+
i0.ɵɵtext(5);
|
|
160
|
+
i0.ɵɵelementEnd();
|
|
161
|
+
i0.ɵɵelementStart(6, "span", 17);
|
|
162
|
+
i0.ɵɵtext(7);
|
|
163
|
+
i0.ɵɵelementEnd()();
|
|
164
|
+
} if (rf & 2) {
|
|
165
|
+
const node_r7 = ctx.$implicit;
|
|
166
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
167
|
+
i0.ɵɵadvance();
|
|
168
|
+
i0.ɵɵattribute("aria-label", "Toggle " + node_r7.key);
|
|
169
|
+
i0.ɵɵadvance(2);
|
|
170
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.treeComponent.treeControl.isExpanded(node_r7) ? "expand_more" : "chevron_right", " ");
|
|
171
|
+
i0.ɵɵadvance(2);
|
|
172
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.treeComponent.treeControl.isExpanded(node_r7) ? "folder_open" : "folder", " ");
|
|
173
|
+
i0.ɵɵadvance(2);
|
|
174
|
+
i0.ɵɵtextInterpolate(node_r7.key);
|
|
175
|
+
} }
|
|
176
|
+
function PostmanCollectionsComponent_Conditional_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
177
|
+
i0.ɵɵelementStart(0, "mat-tree", 5);
|
|
178
|
+
i0.ɵɵtemplate(1, PostmanCollectionsComponent_Conditional_1_Conditional_3_mat_tree_node_1_Template, 5, 2, "mat-tree-node", 6)(2, PostmanCollectionsComponent_Conditional_1_Conditional_3_mat_tree_node_2_Template, 8, 4, "mat-tree-node", 7);
|
|
179
|
+
i0.ɵɵelementEnd();
|
|
180
|
+
} if (rf & 2) {
|
|
181
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
182
|
+
i0.ɵɵproperty("dataSource", ctx_r1.treeComponent.dataSource)("treeControl", ctx_r1.treeComponent.treeControl);
|
|
183
|
+
i0.ɵɵadvance(2);
|
|
184
|
+
i0.ɵɵproperty("matTreeNodeDefWhen", ctx_r1.hasChild);
|
|
185
|
+
} }
|
|
186
|
+
function PostmanCollectionsComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
187
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
188
|
+
i0.ɵɵelementStart(0, "lib-search-field", 2);
|
|
189
|
+
i0.ɵɵtwoWayListener("valueChange", function PostmanCollectionsComponent_Conditional_1_Template_lib_search_field_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.searchKey, $event) || (ctx_r1.searchKey = $event); return i0.ɵɵresetView($event); });
|
|
190
|
+
i0.ɵɵelementEnd();
|
|
191
|
+
i0.ɵɵconditionalCreate(1, PostmanCollectionsComponent_Conditional_1_Conditional_1_Template, 1, 1, "lib-empty-state", 3)(2, PostmanCollectionsComponent_Conditional_1_Conditional_2_Template, 1, 1, "lib-empty-state", 4)(3, PostmanCollectionsComponent_Conditional_1_Conditional_3_Template, 3, 3, "mat-tree", 5);
|
|
192
|
+
} if (rf & 2) {
|
|
193
|
+
let tmp_2_0;
|
|
194
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
195
|
+
i0.ɵɵtwoWayProperty("value", ctx_r1.searchKey);
|
|
196
|
+
i0.ɵɵadvance();
|
|
197
|
+
i0.ɵɵconditional((tmp_2_0 = ctx_r1.error()) ? 1 : ctx_r1.isEmpty() ? 2 : 3, tmp_2_0);
|
|
198
|
+
} }
|
|
199
|
+
/**
|
|
200
|
+
* Internal Postman-collection picker used by `rest-api-call-setup`.
|
|
201
|
+
*
|
|
202
|
+
* Fetches a Postman collection over HTTP and renders it as a searchable tree of
|
|
203
|
+
* endpoints, emitting the selected folder item to the parent. Embedded
|
|
204
|
+
* component — owns only its tree content; the parent renders any field
|
|
205
|
+
* label / hint / errors.
|
|
206
|
+
*/
|
|
207
|
+
class PostmanCollectionsComponent {
|
|
208
|
+
constructor() {
|
|
209
|
+
/** Postman API config (collection URL + key). When invalid the component shows an error. */
|
|
210
|
+
this.postmanCollectionConfig = input(undefined, ...(ngDevMode ? [{ debugName: "postmanCollectionConfig" }] : /* istanbul ignore next */ []));
|
|
211
|
+
/** Endpoint IDs currently in a loading state (rendered with a spinner in the tree). */
|
|
212
|
+
this.loadingEndPoints = input([], ...(ngDevMode ? [{ debugName: "loadingEndPoints" }] : /* istanbul ignore next */ []));
|
|
213
|
+
/** Emits when the user picks an endpoint node from the tree. */
|
|
214
|
+
this.nodeSelectionChanged = output();
|
|
215
|
+
this.#httpClient = inject(HttpClient);
|
|
216
|
+
this.#destroyRef = inject(DestroyRef);
|
|
217
|
+
/** Imperative mat-tree backing store reused from the access-rules tree. */
|
|
218
|
+
this.treeComponent = new TreeComponent();
|
|
219
|
+
/** Raw fetched collection; `undefined` until the request resolves. */
|
|
220
|
+
this.#collection = signal(undefined, ...(ngDevMode ? [{ debugName: "#collection" }] : /* istanbul ignore next */ []));
|
|
221
|
+
/** Current search text, two-way bound to the search field. */
|
|
222
|
+
this.searchKey = signal('', ...(ngDevMode ? [{ debugName: "searchKey" }] : /* istanbul ignore next */ []));
|
|
223
|
+
/** Request-in-flight flag. */
|
|
224
|
+
this.loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
225
|
+
/** Last error (invalid config or HTTP failure); `undefined` when healthy. */
|
|
226
|
+
this.error = signal(undefined, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
227
|
+
/** Folder items after applying the current search, ancestor-folders preserved. */
|
|
228
|
+
this.filteredItems = computed(() => {
|
|
229
|
+
const collection = this.#collection();
|
|
230
|
+
if (!collection) {
|
|
231
|
+
return [];
|
|
232
|
+
}
|
|
233
|
+
return filterCollectionItems(collection, this.searchKey());
|
|
234
|
+
}, ...(ngDevMode ? [{ debugName: "filteredItems" }] : /* istanbul ignore next */ []));
|
|
235
|
+
/** Tree nodes derived from {@link filteredItems}. */
|
|
236
|
+
this.#treeData = computed(() => convertPostmanFolderItemsToTree(this.filteredItems()), ...(ngDevMode ? [{ debugName: "#treeData" }] : /* istanbul ignore next */ []));
|
|
237
|
+
/** True once a collection is loaded but the current search yields nothing. */
|
|
238
|
+
this.isEmpty = computed(() => Boolean(this.#collection()) && this.#treeData().length === 0, ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
239
|
+
/** Cache for {@link getNodeLines} so identical levels reuse one array. */
|
|
240
|
+
this.#nodeLinesCache = new Map();
|
|
241
|
+
/** Push derived tree data into the imperative mat-tree data source. */
|
|
242
|
+
this.syncTree = effect(() => {
|
|
243
|
+
this.treeComponent.assignDataSourceData(this.#treeData());
|
|
244
|
+
}, ...(ngDevMode ? [{ debugName: "syncTree" }] : /* istanbul ignore next */ []));
|
|
245
|
+
this.#hasLoadedOnce = false;
|
|
246
|
+
/** Fetch (or re-fetch) the collection only when the config input's content actually changes. */
|
|
247
|
+
this.loadOnConfigChange = effect(() => {
|
|
248
|
+
const config = this.postmanCollectionConfig();
|
|
249
|
+
if (this.#hasLoadedOnce && _isEqual(this.#loadedConfig, config)) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
this.#hasLoadedOnce = true;
|
|
253
|
+
this.#loadedConfig = config;
|
|
254
|
+
this.#loadCollection(config);
|
|
255
|
+
}, ...(ngDevMode ? [{ debugName: "loadOnConfigChange" }] : /* istanbul ignore next */ []));
|
|
256
|
+
this.hasChild = (_, node) => this.treeComponent.hasChild(_, node);
|
|
257
|
+
}
|
|
258
|
+
#httpClient;
|
|
259
|
+
#destroyRef;
|
|
260
|
+
/** Raw fetched collection; `undefined` until the request resolves. */
|
|
261
|
+
#collection;
|
|
262
|
+
/** Tree nodes derived from {@link filteredItems}. */
|
|
263
|
+
#treeData;
|
|
264
|
+
/** Cache for {@link getNodeLines} so identical levels reuse one array. */
|
|
265
|
+
#nodeLinesCache;
|
|
266
|
+
/** Last config the effect acted on; guards against re-fetching when an unstable parent binding hands us a new-but-equal reference. */
|
|
267
|
+
#loadedConfig;
|
|
268
|
+
#hasLoadedOnce;
|
|
269
|
+
#isValidConfig(config) {
|
|
270
|
+
return Boolean(config?.collectionUrl) && Boolean(config?.collectionKey);
|
|
271
|
+
}
|
|
272
|
+
#loadCollection(config) {
|
|
273
|
+
if (!this.#isValidConfig(config)) {
|
|
274
|
+
this.#collection.set(undefined);
|
|
275
|
+
this.loading.set(false);
|
|
276
|
+
this.error.set(new HttpErrorResponse({ error: 'Invalid Postman Collection Config' }));
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
const requestOptions = {
|
|
280
|
+
params: { apikey: config.collectionKey, clearSystemHeaders: true },
|
|
281
|
+
headers: { 'Content-Type': 'application/json' },
|
|
282
|
+
};
|
|
283
|
+
this.loading.set(true);
|
|
284
|
+
this.#httpClient
|
|
285
|
+
.get(config.collectionUrl, requestOptions)
|
|
286
|
+
.pipe(take(1), tap(data => {
|
|
287
|
+
this.#collection.set(data);
|
|
288
|
+
this.error.set(undefined);
|
|
289
|
+
this.loading.set(false);
|
|
290
|
+
}), catchError((err) => {
|
|
291
|
+
this.loading.set(false);
|
|
292
|
+
this.error.set(err);
|
|
293
|
+
return throwError(() => err);
|
|
294
|
+
}), takeUntilDestroyed(this.#destroyRef))
|
|
295
|
+
.subscribe();
|
|
296
|
+
}
|
|
297
|
+
selectNode(node) {
|
|
298
|
+
this.nodeSelectionChanged.emit(node);
|
|
299
|
+
}
|
|
300
|
+
methodColor(method) {
|
|
301
|
+
return methodColor(method);
|
|
302
|
+
}
|
|
303
|
+
isEndpointLoading(id) {
|
|
304
|
+
return this.loadingEndPoints().includes(id);
|
|
305
|
+
}
|
|
306
|
+
/** Memoised 1..level vertical guide-line indices for tree indentation. */
|
|
307
|
+
getNodeLines(level) {
|
|
308
|
+
const cached = this.#nodeLinesCache.get(level);
|
|
309
|
+
if (cached) {
|
|
310
|
+
return cached;
|
|
311
|
+
}
|
|
312
|
+
const lines = Array.from({ length: level }, (_, i) => i + 1);
|
|
313
|
+
this.#nodeLinesCache.set(level, lines);
|
|
314
|
+
return lines;
|
|
315
|
+
}
|
|
316
|
+
static { this.ɵfac = function PostmanCollectionsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PostmanCollectionsComponent)(); }; }
|
|
317
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PostmanCollectionsComponent, selectors: [["lib-postman-collections"]], hostAttrs: [1, "lib-postman-collections"], inputs: { postmanCollectionConfig: [1, "postmanCollectionConfig"], loadingEndPoints: [1, "loadingEndPoints"] }, outputs: { nodeSelectionChanged: "nodeSelectionChanged" }, decls: 2, vars: 1, consts: [[1, "loading-container"], ["diameter", "36"], ["placeholder", "Search api", 1, "search", 3, "valueChange", "value"], ["icon", "error_outline", 3, "message"], ["icon", "search_off", 3, "message"], [3, "dataSource", "treeControl"], ["matTreeNodePadding", "", 4, "matTreeNodeDef"], ["matTreeNodePadding", "", 4, "matTreeNodeDef", "matTreeNodeDefWhen"], ["matTreeNodePadding", ""], ["diameter", "22", 1, "loading-spinner"], [1, "line", 3, "left"], ["mat-button", "", 1, "item", 3, "disabled", "matTooltip"], [1, "line"], ["mat-button", "", 1, "item", 3, "click", "disabled", "matTooltip"], [1, "node-key", "method"], ["mat-icon-button", "", "matTreeNodeToggle", "", 1, "toggle"], [1, "folder-icon"], [1, "folder-label"]], template: function PostmanCollectionsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
318
|
+
i0.ɵɵconditionalCreate(0, PostmanCollectionsComponent_Conditional_0_Template, 2, 0, "div", 0)(1, PostmanCollectionsComponent_Conditional_1_Template, 4, 2);
|
|
319
|
+
} if (rf & 2) {
|
|
320
|
+
i0.ɵɵconditional(ctx.loading() ? 0 : 1);
|
|
321
|
+
} }, dependencies: [MatTreeModule, i1.MatTreeNodeDef, i1.MatTreeNodePadding, i1.MatTreeNodeToggle, i1.MatTree, i1.MatTreeNode, MatIconModule, i3.MatIcon, MatButtonModule, i1$1.MatButton, i1$1.MatIconButton, MatProgressSpinnerModule, i4.MatProgressSpinner, MatTooltipModule, i5.MatTooltip, SearchFieldComponent,
|
|
322
|
+
EmptyStateComponent], styles: ["[_nghost-%COMP%]{display:block}.search[_ngcontent-%COMP%]{margin-bottom:1rem}mat-tree[_ngcontent-%COMP%]{background:none}[_nghost-%COMP%] mat-tree-node[_ngcontent-%COMP%]{min-height:28px;height:32px}.toggle[_ngcontent-%COMP%]{padding:0}.folder-icon[_ngcontent-%COMP%]{color:var(--lib-forms-on-surface-variant)}.folder-label[_ngcontent-%COMP%]{margin-left:.5rem;font-weight:500}.item[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:left;text-align:left;font-size:small;font-weight:400;white-space:nowrap;overflow:hidden}.method[_ngcontent-%COMP%]{display:inline-block;width:38px;text-align:right}.line[_ngcontent-%COMP%]{position:absolute;height:32px;left:48px;width:1px;background:color-mix(in srgb,var(--lib-forms-outline) 40%,transparent)}.loading-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;padding:2rem}"], changeDetection: 0 }); }
|
|
323
|
+
}
|
|
324
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PostmanCollectionsComponent, [{
|
|
325
|
+
type: Component,
|
|
326
|
+
args: [{ selector: 'lib-postman-collections', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: { 'class': 'lib-postman-collections' }, imports: [
|
|
327
|
+
MatTreeModule,
|
|
328
|
+
MatIconModule,
|
|
329
|
+
MatButtonModule,
|
|
330
|
+
MatProgressSpinnerModule,
|
|
331
|
+
MatTooltipModule,
|
|
332
|
+
SearchFieldComponent,
|
|
333
|
+
EmptyStateComponent,
|
|
334
|
+
], template: "@if (loading()) {\n <div class=\"loading-container\">\n <mat-spinner diameter=\"36\"></mat-spinner>\n </div>\n} @else {\n <lib-search-field\n class=\"search\"\n placeholder=\"Search api\"\n [(value)]=\"searchKey\" />\n\n @if (error(); as err) {\n <lib-empty-state icon=\"error_outline\" [message]=\"err.message\" />\n } @else if (isEmpty()) {\n <lib-empty-state\n icon=\"search_off\"\n [message]=\"searchKey() ? 'No endpoints match your search' : 'No endpoints in this collection'\" />\n } @else {\n <mat-tree\n [dataSource]=\"treeComponent.dataSource\"\n [treeControl]=\"treeComponent.treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n @if (isEndpointLoading(node.value.id)) {\n <mat-spinner diameter=\"22\" class=\"loading-spinner\"></mat-spinner>\n }\n @for (line of getNodeLines(node.level); track line) {\n <div class=\"line\" [style.left.px]=\"line * 40 + 8\"></div>\n }\n @if (node.value?.request; as request) {\n <button\n mat-button\n class=\"item\"\n [disabled]=\"(!request.body?.raw && request.method === 'POST') || !request.url?.raw\"\n [matTooltip]=\"request.url?.raw || 'Invalid Postman config, missing Endpoint URL'\"\n (click)=\"selectNode(node.value)\">\n <span class=\"node-key method\" [style.color]=\"methodColor(request.method)\">\n {{ request.method }}\n </span>\n <span>{{ node.key }}</span>\n </button>\n }\n </mat-tree-node>\n\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button\n mat-icon-button\n matTreeNodeToggle\n class=\"toggle\"\n [attr.aria-label]=\"'Toggle ' + node.key\">\n <mat-icon>\n {{ treeComponent.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <mat-icon class=\"folder-icon\">\n {{ treeComponent.treeControl.isExpanded(node) ? 'folder_open' : 'folder' }}\n </mat-icon>\n <span class=\"folder-label\">{{ node.key }}</span>\n </mat-tree-node>\n </mat-tree>\n }\n}\n", styles: [":host{display:block}.search{margin-bottom:1rem}mat-tree{background:none}:host mat-tree-node{min-height:28px;height:32px}.toggle{padding:0}.folder-icon{color:var(--lib-forms-on-surface-variant)}.folder-label{margin-left:.5rem;font-weight:500}.item{display:flex;width:100%;justify-content:left;text-align:left;font-size:small;font-weight:400;white-space:nowrap;overflow:hidden}.method{display:inline-block;width:38px;text-align:right}.line{position:absolute;height:32px;left:48px;width:1px;background:color-mix(in srgb,var(--lib-forms-outline) 40%,transparent)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;padding:2rem}\n"] }]
|
|
335
|
+
}], null, { postmanCollectionConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "postmanCollectionConfig", required: false }] }], loadingEndPoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingEndPoints", required: false }] }], nodeSelectionChanged: [{ type: i0.Output, args: ["nodeSelectionChanged"] }] }); })();
|
|
336
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PostmanCollectionsComponent, { className: "PostmanCollectionsComponent", filePath: "lib/components/t-dynamic-data-edit/elements/postman-collections/postman-collections.component.ts", lineNumber: 64 }); })();
|
|
337
|
+
|
|
338
|
+
function RestApiCallSetupComponent_Case_0_Template(rf, ctx) { if (rf & 1) {
|
|
339
|
+
i0.ɵɵelement(0, "lib-empty-state", 0);
|
|
340
|
+
} }
|
|
341
|
+
function RestApiCallSetupComponent_Case_1_Template(rf, ctx) { if (rf & 1) {
|
|
342
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
343
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "button", 5);
|
|
344
|
+
i0.ɵɵlistener("click", function RestApiCallSetupComponent_Case_1_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.clearValue()); });
|
|
345
|
+
i0.ɵɵelementStart(2, "span", 6);
|
|
346
|
+
i0.ɵɵtext(3);
|
|
347
|
+
i0.ɵɵelementEnd();
|
|
348
|
+
i0.ɵɵelementStart(4, "span", 7);
|
|
349
|
+
i0.ɵɵtext(5);
|
|
350
|
+
i0.ɵɵelementEnd();
|
|
351
|
+
i0.ɵɵelementStart(6, "mat-icon", 8);
|
|
352
|
+
i0.ɵɵtext(7, "close");
|
|
353
|
+
i0.ɵɵelementEnd()()();
|
|
354
|
+
} if (rf & 2) {
|
|
355
|
+
let tmp_2_0;
|
|
356
|
+
let tmp_4_0;
|
|
357
|
+
let tmp_5_0;
|
|
358
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
359
|
+
i0.ɵɵadvance();
|
|
360
|
+
i0.ɵɵproperty("disabled", ctx_r1.disabled())("matTooltip", ((tmp_2_0 = ctx_r1.currentValue()) == null ? null : tmp_2_0.httpEndPoint) ?? "");
|
|
361
|
+
i0.ɵɵadvance();
|
|
362
|
+
i0.ɵɵstyleProp("color", ctx_r1.methodColor());
|
|
363
|
+
i0.ɵɵadvance();
|
|
364
|
+
i0.ɵɵtextInterpolate1(" ", (tmp_4_0 = ctx_r1.currentValue()) == null ? null : tmp_4_0.httpMethod, " ");
|
|
365
|
+
i0.ɵɵadvance(2);
|
|
366
|
+
i0.ɵɵtextInterpolate1(" ", (tmp_5_0 = ctx_r1.currentValue()) == null ? null : tmp_5_0.name, " ");
|
|
367
|
+
} }
|
|
368
|
+
function RestApiCallSetupComponent_Case_2_Template(rf, ctx) { if (rf & 1) {
|
|
369
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
370
|
+
i0.ɵɵelementStart(0, "lib-postman-collections", 9);
|
|
371
|
+
i0.ɵɵlistener("nodeSelectionChanged", function RestApiCallSetupComponent_Case_2_Template_lib_postman_collections_nodeSelectionChanged_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.nodeSelectionChanged($event)); });
|
|
372
|
+
i0.ɵɵelementEnd();
|
|
373
|
+
} if (rf & 2) {
|
|
374
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
375
|
+
i0.ɵɵclassProp("lib-rest-api-call-setup__picker--disabled", ctx_r1.disabled());
|
|
376
|
+
i0.ɵɵproperty("postmanCollectionConfig", ctx_r1.postmanCollectionConfig())("loadingEndPoints", ctx_r1.loadingEndPoints());
|
|
377
|
+
} }
|
|
378
|
+
function RestApiCallSetupComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
379
|
+
i0.ɵɵelementStart(0, "p", 3)(1, "mat-icon", 10);
|
|
380
|
+
i0.ɵɵtext(2, "lock");
|
|
381
|
+
i0.ɵɵelementEnd();
|
|
382
|
+
i0.ɵɵelementStart(3, "span");
|
|
383
|
+
i0.ɵɵtext(4, "This endpoint is locked and cannot be changed.");
|
|
384
|
+
i0.ɵɵelementEnd()();
|
|
385
|
+
} }
|
|
386
|
+
let nextId = 0;
|
|
387
|
+
/** CSS-variable colour per HTTP method (dark-mode-safe; never a hex literal). */
|
|
388
|
+
const METHOD_COLOR = {
|
|
389
|
+
GET: 'var(--lib-forms-method-get)',
|
|
390
|
+
POST: 'var(--lib-forms-method-post)',
|
|
391
|
+
PUT: 'var(--lib-forms-method-put)',
|
|
392
|
+
DELETE: 'var(--lib-forms-method-delete)',
|
|
393
|
+
};
|
|
394
|
+
/**
|
|
395
|
+
* Parses a Postman raw request body into a plain object.
|
|
396
|
+
*
|
|
397
|
+
* Returns `{}` for an absent, blank or non-JSON body (a `graphql` / `formdata`
|
|
398
|
+
* mode, or raw text with comments). Nesting and key names are preserved exactly as
|
|
399
|
+
* authored — this is the document template mode seeds from.
|
|
400
|
+
*
|
|
401
|
+
* @param raw - `request.body.raw` from the Postman collection.
|
|
402
|
+
* @returns The parsed body, or `{}` when there is nothing usable.
|
|
403
|
+
*/
|
|
404
|
+
function parseRawBody(raw) {
|
|
405
|
+
if (typeof raw !== 'string' || raw.trim() === '')
|
|
406
|
+
return {};
|
|
407
|
+
try {
|
|
408
|
+
const parsed = JSON.parse(raw);
|
|
409
|
+
return parsed !== null && typeof parsed === 'object' ? parsed : {};
|
|
410
|
+
}
|
|
411
|
+
catch {
|
|
412
|
+
return {};
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
/** True when a parsed body carries at least one key — i.e. it is worth persisting. */
|
|
416
|
+
function isNonEmptyBody(body) {
|
|
417
|
+
return Object.keys(body).length > 0;
|
|
418
|
+
}
|
|
419
|
+
/** Maps a JS `typeof` string to the shared {@link JsDataTypes} enum member. */
|
|
420
|
+
function toJsDataType(value) {
|
|
421
|
+
switch (typeof value) {
|
|
422
|
+
case 'string':
|
|
423
|
+
return JsDataTypes.String;
|
|
424
|
+
case 'number':
|
|
425
|
+
return JsDataTypes.Number;
|
|
426
|
+
case 'bigint':
|
|
427
|
+
return JsDataTypes.BigInt;
|
|
428
|
+
case 'boolean':
|
|
429
|
+
return JsDataTypes.Boolean;
|
|
430
|
+
case 'symbol':
|
|
431
|
+
return JsDataTypes.Symbol;
|
|
432
|
+
case 'function':
|
|
433
|
+
return JsDataTypes.Function;
|
|
434
|
+
case 'object':
|
|
435
|
+
return JsDataTypes.Object;
|
|
436
|
+
default:
|
|
437
|
+
return JsDataTypes.Undefined;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Lets the user pick an API endpoint from a Postman collection and exposes the
|
|
442
|
+
* resulting {@link APIDataFetchingConfigurationInterface}. Renders one of three
|
|
443
|
+
* states — no collection configured, the endpoint picker, or the selected
|
|
444
|
+
* endpoint card — and embeds {@link PostmanCollectionsComponent} for the tree.
|
|
445
|
+
*
|
|
446
|
+
* Internal editor consumed by `t-dynamic-data-edit` and `data-source-picker`;
|
|
447
|
+
* the parent owns the field label, hint and validation chrome.
|
|
448
|
+
*
|
|
449
|
+
* @example
|
|
450
|
+
* <lib-rest-api-call-setup
|
|
451
|
+
* [postmanCollectionConfig]="config()"
|
|
452
|
+
* [value]="value()"
|
|
453
|
+
* [disabled]="disabled()"
|
|
454
|
+
* (valueChanged)="onApiConfig($event)" />
|
|
455
|
+
*/
|
|
456
|
+
class RestApiCallSetupComponent {
|
|
457
|
+
constructor() {
|
|
458
|
+
this.#fallbackId = `lib-rest-api-call-setup-${nextId++}`;
|
|
459
|
+
/** Optional consumer-provided host id. */
|
|
460
|
+
this.id = input(undefined, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
461
|
+
/** Postman collection that backs the picker. */
|
|
462
|
+
this.postmanCollectionConfig = input(undefined, ...(ngDevMode ? [{ debugName: "postmanCollectionConfig" }] : /* istanbul ignore next */ []));
|
|
463
|
+
/**
|
|
464
|
+
* Optional HTTP GET function for fetching sample responses. Retained on the
|
|
465
|
+
* contract for parity; this editor does not invoke it (selection is resolved
|
|
466
|
+
* from the Postman collection the parent already loads).
|
|
467
|
+
*/
|
|
468
|
+
this.httpGetDataFunction = input(undefined, ...(ngDevMode ? [{ debugName: "httpGetDataFunction" }] : /* istanbul ignore next */ []));
|
|
469
|
+
/** Disables the picker and shows a lock affordance. */
|
|
470
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
471
|
+
/** Current configuration value. */
|
|
472
|
+
this.value = input(undefined, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
473
|
+
/** Validation errors surfaced from the parent editor. */
|
|
474
|
+
this.errors = input([], ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
475
|
+
/** Emits whenever the user selects a new endpoint or clears the value. */
|
|
476
|
+
this.valueChanged = output();
|
|
477
|
+
/** Endpoint IDs currently loading sample data (forwarded to the picker). */
|
|
478
|
+
this.loadingEndPoints = signal([], ...(ngDevMode ? [{ debugName: "loadingEndPoints" }] : /* istanbul ignore next */ []));
|
|
479
|
+
/** Local snapshot of the value, bridged from the `value` input. */
|
|
480
|
+
this.#localValue = signal(undefined, ...(ngDevMode ? [{ debugName: "#localValue" }] : /* istanbul ignore next */ []));
|
|
481
|
+
/** Read-only view of the active configuration for the template. */
|
|
482
|
+
this.currentValue = this.#localValue.asReadonly();
|
|
483
|
+
/** Host id: consumer-provided or a stable per-instance fallback. */
|
|
484
|
+
this.hostId = computed(() => this.id() ?? this.#fallbackId, ...(ngDevMode ? [{ debugName: "hostId" }] : /* istanbul ignore next */ []));
|
|
485
|
+
/** True once the snapshot carries a usable endpoint + method. */
|
|
486
|
+
this.hasValidValue = computed(() => {
|
|
487
|
+
const v = this.#localValue();
|
|
488
|
+
return Boolean(v?.httpEndPoint) && Boolean(v?.httpMethod);
|
|
489
|
+
}, ...(ngDevMode ? [{ debugName: "hasValidValue" }] : /* istanbul ignore next */ []));
|
|
490
|
+
/** Discrete UI mode driving the template's `@switch`. */
|
|
491
|
+
this.mode = computed(() => {
|
|
492
|
+
if (!this.postmanCollectionConfig())
|
|
493
|
+
return 'no-collection';
|
|
494
|
+
return this.hasValidValue() ? 'selected' : 'picker';
|
|
495
|
+
}, ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
496
|
+
/** Token-based colour for the selected endpoint's HTTP method badge. */
|
|
497
|
+
this.methodColor = computed(() => {
|
|
498
|
+
const method = this.#localValue()?.httpMethod;
|
|
499
|
+
return method && method in METHOD_COLOR ? METHOD_COLOR[method] : 'currentColor';
|
|
500
|
+
}, ...(ngDevMode ? [{ debugName: "methodColor" }] : /* istanbul ignore next */ []));
|
|
501
|
+
/**
|
|
502
|
+
* Bridge the `value` input into the local mutable snapshot, de-duping with a
|
|
503
|
+
* deep structural compare (replaces the legacy `JSON.stringify` equality so
|
|
504
|
+
* key order and `undefined` no longer cause spurious resets).
|
|
505
|
+
*/
|
|
506
|
+
this.valueBridge = effect(() => {
|
|
507
|
+
const next = this.value();
|
|
508
|
+
if (!_isEqual(next, this.#localValue())) {
|
|
509
|
+
this.#localValue.set(next);
|
|
510
|
+
}
|
|
511
|
+
}, ...(ngDevMode ? [{ debugName: "valueBridge" }] : /* istanbul ignore next */ []));
|
|
512
|
+
}
|
|
513
|
+
#fallbackId;
|
|
514
|
+
/** Local snapshot of the value, bridged from the `value` input. */
|
|
515
|
+
#localValue;
|
|
516
|
+
/**
|
|
517
|
+
* Maps the selected tree node into the API config and emits it.
|
|
518
|
+
*
|
|
519
|
+
* Gated on `request` alone. It used to also require `node.response` — a saved
|
|
520
|
+
* Postman *example response* — even though nothing here reads it. An endpoint
|
|
521
|
+
* without one could not be selected at all: the click was a silent no-op, the
|
|
522
|
+
* config was never rebuilt, `requestBody` was never captured, and template mode
|
|
523
|
+
* went on showing whatever skeleton was already persisted. A folder node (the
|
|
524
|
+
* only other thing the picker can emit) has no `request`, so that check alone
|
|
525
|
+
* is the correct guard.
|
|
526
|
+
*/
|
|
527
|
+
nodeSelectionChanged(node) {
|
|
528
|
+
const { id, name, request } = node;
|
|
529
|
+
if (!request)
|
|
530
|
+
return;
|
|
531
|
+
const requestBody = parseRawBody(request.body?.raw);
|
|
532
|
+
const isPost = request.method === 'POST';
|
|
533
|
+
const minimumInputRequired = isPost
|
|
534
|
+
? this.#extractRequiredInputs(requestBody)
|
|
535
|
+
: [];
|
|
536
|
+
const config = {
|
|
537
|
+
_id: id,
|
|
538
|
+
name,
|
|
539
|
+
httpEndPoint: request.url.raw,
|
|
540
|
+
httpMethod: request.method,
|
|
541
|
+
source: DataSources.Api,
|
|
542
|
+
postFormData: isPost,
|
|
543
|
+
backEndConfig: {
|
|
544
|
+
minimumInputRequired,
|
|
545
|
+
// The endpoint's untouched body is the ONLY faithful record of a nested
|
|
546
|
+
// payload (`minimumInputRequired` entries carry a `name`, not a path), so it
|
|
547
|
+
// is what seeds template mode. Captured for every method that actually sends
|
|
548
|
+
// one — keyed on the body being present, not on `method === 'POST'`, because
|
|
549
|
+
// PUT/PATCH bodies are equally real. Omitted entirely when there is nothing
|
|
550
|
+
// to store, so `deriveDefaultPayloadTemplate` falls back cleanly.
|
|
551
|
+
...(isNonEmptyBody(requestBody)
|
|
552
|
+
? { requestBody: requestBody }
|
|
553
|
+
: {}),
|
|
554
|
+
},
|
|
555
|
+
};
|
|
556
|
+
this.#localValue.set(config);
|
|
557
|
+
this.valueChanged.emit(config);
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Clears the selection and emits a single `undefined` (the legacy double-emit
|
|
561
|
+
* — `undefined` then a stub `{ source }` — was removed; see FLAG).
|
|
562
|
+
*/
|
|
563
|
+
clearValue() {
|
|
564
|
+
this.#localValue.set(undefined);
|
|
565
|
+
this.valueChanged.emit(undefined);
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Derives the POST endpoint's required inputs from the request body. Top-level
|
|
569
|
+
* keys are primary; entries under `data` are secondary (non-primary).
|
|
570
|
+
*
|
|
571
|
+
* **Deliberately flat.** `MinimumInputRequiredInterface` has a `name`, not a path,
|
|
572
|
+
* so a nested value can only ever become one `JsDataTypes.Object` entry — mapping
|
|
573
|
+
* `filter.archive` is not expressible here. That is what template mode is for, and
|
|
574
|
+
* why the untouched `requestBody` is captured alongside this (see the caller): it is
|
|
575
|
+
* the only faithful record of a nested payload.
|
|
576
|
+
*/
|
|
577
|
+
#extractRequiredInputs(requestBody) {
|
|
578
|
+
const { data, ...rest } = requestBody;
|
|
579
|
+
const dataEntries = data && typeof data === 'object' ? { ...data } : {};
|
|
580
|
+
const primaryKeys = Object.entries(rest).map(([key, val]) => this.#toRequiredInput(key, val, true));
|
|
581
|
+
const secondaryKeys = Object.entries(dataEntries).map(([key, val]) => this.#toRequiredInput(key, val, false));
|
|
582
|
+
return [...primaryKeys, ...secondaryKeys];
|
|
583
|
+
}
|
|
584
|
+
#toRequiredInput(name, value, primaryKey) {
|
|
585
|
+
return { name, type: toJsDataType(value), primaryKey };
|
|
586
|
+
}
|
|
587
|
+
static { this.ɵfac = function RestApiCallSetupComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RestApiCallSetupComponent)(); }; }
|
|
588
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RestApiCallSetupComponent, selectors: [["lib-rest-api-call-setup"]], hostAttrs: [1, "lib-rest-api-call-setup"], hostVars: 2, hostBindings: function RestApiCallSetupComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
589
|
+
i0.ɵɵdomProperty("id", ctx.hostId());
|
|
590
|
+
i0.ɵɵattribute("data-mode", ctx.mode());
|
|
591
|
+
} }, inputs: { id: [1, "id"], postmanCollectionConfig: [1, "postmanCollectionConfig"], httpGetDataFunction: [1, "httpGetDataFunction"], disabled: [1, "disabled"], value: [1, "value"], errors: [1, "errors"] }, outputs: { valueChanged: "valueChanged" }, decls: 5, vars: 3, consts: [["icon", "link_off", "message", "No Postman collection configured. Add a collection id and API key to pick an endpoint."], [1, "lib-rest-api-call-setup__card"], [1, "lib-rest-api-call-setup__picker", 3, "lib-rest-api-call-setup__picker--disabled", "postmanCollectionConfig", "loadingEndPoints"], [1, "lib-rest-api-call-setup__lock"], [3, "errors"], ["type", "button", "mat-button", "", 1, "lib-rest-api-call-setup__endpoint", 3, "click", "disabled", "matTooltip"], [1, "lib-rest-api-call-setup__method"], [1, "lib-rest-api-call-setup__name"], ["aria-hidden", "true", 1, "lib-rest-api-call-setup__clear"], [1, "lib-rest-api-call-setup__picker", 3, "nodeSelectionChanged", "postmanCollectionConfig", "loadingEndPoints"], ["aria-hidden", "true"]], template: function RestApiCallSetupComponent_Template(rf, ctx) { if (rf & 1) {
|
|
592
|
+
i0.ɵɵconditionalCreate(0, RestApiCallSetupComponent_Case_0_Template, 1, 0, "lib-empty-state", 0)(1, RestApiCallSetupComponent_Case_1_Template, 8, 6, "div", 1)(2, RestApiCallSetupComponent_Case_2_Template, 1, 4, "lib-postman-collections", 2);
|
|
593
|
+
i0.ɵɵconditionalCreate(3, RestApiCallSetupComponent_Conditional_3_Template, 5, 0, "p", 3);
|
|
594
|
+
i0.ɵɵelement(4, "lib-error-list", 4);
|
|
595
|
+
} if (rf & 2) {
|
|
596
|
+
let tmp_0_0;
|
|
597
|
+
i0.ɵɵconditional((tmp_0_0 = ctx.mode()) === "no-collection" ? 0 : tmp_0_0 === "selected" ? 1 : tmp_0_0 === "picker" ? 2 : -1);
|
|
598
|
+
i0.ɵɵadvance(3);
|
|
599
|
+
i0.ɵɵconditional(ctx.disabled() ? 3 : -1);
|
|
600
|
+
i0.ɵɵadvance();
|
|
601
|
+
i0.ɵɵproperty("errors", ctx.errors());
|
|
602
|
+
} }, dependencies: [PostmanCollectionsComponent,
|
|
603
|
+
EmptyStateComponent,
|
|
604
|
+
ErrorListComponent,
|
|
605
|
+
MatButtonModule, i1$1.MatButton, MatIconModule, i3.MatIcon, MatTooltipModule, i5.MatTooltip], styles: ["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.lib-rest-api-call-setup__card[_ngcontent-%COMP%]{background:var(--lib-forms-surface);border:1px solid color-mix(in srgb,var(--lib-forms-outline) 15%,transparent);border-radius:var(--lib-forms-radius-lg, 12px);box-shadow:var(--lib-forms-shadow-resting);padding:.5rem}.lib-rest-api-call-setup__endpoint[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;width:100%;justify-content:flex-start;padding:.5rem .75rem;font-weight:400;text-align:left;color:var(--lib-forms-on-surface);overflow:hidden}.lib-rest-api-call-setup__method[_ngcontent-%COMP%]{flex:0 0 auto;font-size:.625rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase}.lib-rest-api-call-setup__name[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--lib-forms-on-surface)}.lib-rest-api-call-setup__clear[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--lib-forms-on-surface-variant)}.lib-rest-api-call-setup__picker--disabled[_ngcontent-%COMP%]{opacity:.55;pointer-events:none}.lib-rest-api-call-setup__lock[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0;font-size:.8125rem;line-height:1.4;color:var(--lib-forms-on-surface-variant)}"], changeDetection: 0 }); }
|
|
606
|
+
}
|
|
607
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RestApiCallSetupComponent, [{
|
|
608
|
+
type: Component,
|
|
609
|
+
args: [{ selector: 'lib-rest-api-call-setup', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [
|
|
610
|
+
PostmanCollectionsComponent,
|
|
611
|
+
EmptyStateComponent,
|
|
612
|
+
ErrorListComponent,
|
|
613
|
+
MatButtonModule,
|
|
614
|
+
MatIconModule,
|
|
615
|
+
MatTooltipModule,
|
|
616
|
+
], host: {
|
|
617
|
+
'class': 'lib-rest-api-call-setup',
|
|
618
|
+
'[id]': 'hostId()',
|
|
619
|
+
'[attr.data-mode]': 'mode()',
|
|
620
|
+
}, template: "@switch (mode()) {\n @case ('no-collection') {\n <lib-empty-state\n icon=\"link_off\"\n message=\"No Postman collection configured. Add a collection id and API key to pick an endpoint.\" />\n }\n\n @case ('selected') {\n <div class=\"lib-rest-api-call-setup__card\">\n <button\n type=\"button\"\n class=\"lib-rest-api-call-setup__endpoint\"\n mat-button\n [disabled]=\"disabled()\"\n [matTooltip]=\"currentValue()?.httpEndPoint ?? ''\"\n (click)=\"clearValue()\">\n <span class=\"lib-rest-api-call-setup__method\" [style.color]=\"methodColor()\">\n {{ currentValue()?.httpMethod }}\n </span>\n <span class=\"lib-rest-api-call-setup__name\">\n {{ currentValue()?.name }}\n </span>\n <mat-icon class=\"lib-rest-api-call-setup__clear\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n }\n\n @case ('picker') {\n <lib-postman-collections\n class=\"lib-rest-api-call-setup__picker\"\n [class.lib-rest-api-call-setup__picker--disabled]=\"disabled()\"\n [postmanCollectionConfig]=\"postmanCollectionConfig()!\"\n [loadingEndPoints]=\"loadingEndPoints()\"\n (nodeSelectionChanged)=\"nodeSelectionChanged($event)\" />\n }\n}\n\n@if (disabled()) {\n <p class=\"lib-rest-api-call-setup__lock\">\n <mat-icon aria-hidden=\"true\">lock</mat-icon>\n <span>This endpoint is locked and cannot be changed.</span>\n </p>\n}\n\n<lib-error-list [errors]=\"errors()\" />\n", styles: [":host{display:flex;flex-direction:column;gap:1.5rem}.lib-rest-api-call-setup__card{background:var(--lib-forms-surface);border:1px solid color-mix(in srgb,var(--lib-forms-outline) 15%,transparent);border-radius:var(--lib-forms-radius-lg, 12px);box-shadow:var(--lib-forms-shadow-resting);padding:.5rem}.lib-rest-api-call-setup__endpoint{display:flex;align-items:center;gap:.75rem;width:100%;justify-content:flex-start;padding:.5rem .75rem;font-weight:400;text-align:left;color:var(--lib-forms-on-surface);overflow:hidden}.lib-rest-api-call-setup__method{flex:0 0 auto;font-size:.625rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase}.lib-rest-api-call-setup__name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--lib-forms-on-surface)}.lib-rest-api-call-setup__clear{flex:0 0 auto;color:var(--lib-forms-on-surface-variant)}.lib-rest-api-call-setup__picker--disabled{opacity:.55;pointer-events:none}.lib-rest-api-call-setup__lock{display:flex;align-items:center;gap:.5rem;margin:0;font-size:.8125rem;line-height:1.4;color:var(--lib-forms-on-surface-variant)}\n"] }]
|
|
621
|
+
}], null, { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], postmanCollectionConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "postmanCollectionConfig", required: false }] }], httpGetDataFunction: [{ type: i0.Input, args: [{ isSignal: true, alias: "httpGetDataFunction", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }] }); })();
|
|
622
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RestApiCallSetupComponent, { className: "RestApiCallSetupComponent", filePath: "lib/components/t-dynamic-data-edit/elements/rest-api-call-setup/rest-api-call-setup.component.ts", lineNumber: 131 }); })();
|
|
623
|
+
|
|
624
|
+
export { RestApiCallSetupComponent };
|
|
625
|
+
//# sourceMappingURL=ngx-t-forms-rest-api-call-setup.component-BEqnJqZG.mjs.map
|