ngx-t-forms 3.1.5 → 3.1.7
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-DLg5vzNJ.mjs → ngx-t-forms-api-endpoint-config.component-CCwUtGOH.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-api-endpoint-config.component-DLg5vzNJ.mjs.map → ngx-t-forms-api-endpoint-config.component-CCwUtGOH.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-CQ9gB964.mjs → ngx-t-forms-auto-complete-input-element.component-BUCFidjW.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-CQ9gB964.mjs.map → ngx-t-forms-auto-complete-input-element.component-BUCFidjW.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-B-J4qO_Z.mjs → ngx-t-forms-basic-input-input-element.component-C92Y7CW_.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-B-J4qO_Z.mjs.map → ngx-t-forms-basic-input-input-element.component-C92Y7CW_.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-KHUBx8wM.mjs → ngx-t-forms-calculated-field-rules.component-33ZARq4R.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-KHUBx8wM.mjs.map → ngx-t-forms-calculated-field-rules.component-33ZARq4R.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-DAZVCoUZ.mjs → ngx-t-forms-chip-options-creator-editor.component-CWJMjBoK.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-DAZVCoUZ.mjs.map → ngx-t-forms-chip-options-creator-editor.component-CWJMjBoK.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-conditional-display-config.component-p3dEGx1z.mjs → ngx-t-forms-conditional-display-config.component-zauBVptA.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-conditional-display-config.component-p3dEGx1z.mjs.map → ngx-t-forms-conditional-display-config.component-zauBVptA.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CAk0k2YC.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-C096Ib2V.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CAk0k2YC.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-C096Ib2V.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-data-source-picker.component-CUVjocuE.mjs → ngx-t-forms-data-source-picker.component-WkSQqjd-.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-data-source-picker.component-CUVjocuE.mjs.map → ngx-t-forms-data-source-picker.component-WkSQqjd-.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-lQfvlGfA.mjs → ngx-t-forms-date-picker-input-element.component-Dtzq25sw.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-lQfvlGfA.mjs.map → ngx-t-forms-date-picker-input-element.component-Dtzq25sw.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-7t9Ib-35.mjs → ngx-t-forms-date-range-picker-input-element.component-W8KV-zoC.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-7t9Ib-35.mjs.map → ngx-t-forms-date-range-picker-input-element.component-W8KV-zoC.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-time-picker-input-element.component-Co0nzt6l.mjs → ngx-t-forms-date-time-picker-input-element.component-CQXZDwAo.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-time-picker-input-element.component-Co0nzt6l.mjs.map → ngx-t-forms-date-time-picker-input-element.component-CQXZDwAo.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-xQuX0E3x.mjs → ngx-t-forms-document-list-label-config-editor.component-3LcpNBQI.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-xQuX0E3x.mjs.map → ngx-t-forms-document-list-label-config-editor.component-3LcpNBQI.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-document-picker.component-umv9Z3rU.mjs → ngx-t-forms-document-picker.component-CvATcveO.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-document-picker.component-umv9Z3rU.mjs.map → ngx-t-forms-document-picker.component-CvATcveO.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-editor-input-element.component-BHq-LOhI.mjs → ngx-t-forms-editor-input-element.component-BqofP5-4.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-editor-input-element.component-BHq-LOhI.mjs.map → ngx-t-forms-editor-input-element.component-BqofP5-4.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-DjVntIfw.mjs → ngx-t-forms-file-upload-input-element.component-BAQx2BLX.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-DjVntIfw.mjs.map → ngx-t-forms-file-upload-input-element.component-BAQx2BLX.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-input-selector.component-DX85MMcQ.mjs → ngx-t-forms-form-input-selector.component-M6O7-j2Q.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-input-selector.component-DX85MMcQ.mjs.map → ngx-t-forms-form-input-selector.component-M6O7-j2Q.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-f6QyPY6E.mjs → ngx-t-forms-form-json-view.component-Dd-EMosV.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-f6QyPY6E.mjs.map → ngx-t-forms-form-json-view.component-Dd-EMosV.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-ChaSUCrg.mjs → ngx-t-forms-form-section-stepper.component-B1dYMlCC.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-ChaSUCrg.mjs.map → ngx-t-forms-form-section-stepper.component-B1dYMlCC.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-Qkw23Bzy.mjs → ngx-t-forms-forms-builder-menu.component-S2qfSAT-.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-Qkw23Bzy.mjs.map → ngx-t-forms-forms-builder-menu.component-S2qfSAT-.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-geo-location.component-DqYEmeLs.mjs → ngx-t-forms-geo-location.component-whY7YIMk.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-geo-location.component-DqYEmeLs.mjs.map → ngx-t-forms-geo-location.component-whY7YIMk.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-header-template-editor.component-CIft152I.mjs → ngx-t-forms-header-template-editor.component-BLn_-jPM.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-header-template-editor.component-CIft152I.mjs.map → ngx-t-forms-header-template-editor.component-BLn_-jPM.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-BmVXoC_z.mjs → ngx-t-forms-image-capture-input-element.component-D05NKiWm.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-BmVXoC_z.mjs.map → ngx-t-forms-image-capture-input-element.component-D05NKiWm.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-index-BnK4nGDh.mjs +2 -0
- package/fesm2022/ngx-t-forms-index-BnK4nGDh.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-custom.component-CTye_tsv.mjs → ngx-t-forms-input-custom.component-CGz6j56m.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-input-custom.component-CTye_tsv.mjs.map → ngx-t-forms-input-custom.component-CGz6j56m.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-input-editor.component-DbhnFkYQ.mjs → ngx-t-forms-input-editor.component-DxrkUbed.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-input-editor.component-DbhnFkYQ.mjs.map → ngx-t-forms-input-editor.component-DxrkUbed.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-B49fcbzx.mjs → ngx-t-forms-map-mat-options-keys-Cu_L5CRA.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-B49fcbzx.mjs.map → ngx-t-forms-map-mat-options-keys-Cu_L5CRA.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C0iLh1ON.mjs → ngx-t-forms-mat-chip-list-editor.component-B98Hv4M1.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C0iLh1ON.mjs.map → ngx-t-forms-mat-chip-list-editor.component-B98Hv4M1.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BsX7Ezy-.mjs → ngx-t-forms-missing-form-configs.component-CSnHK6ZR.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BsX7Ezy-.mjs.map → ngx-t-forms-missing-form-configs.component-CSnHK6ZR.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-D8GL9Aht.mjs → ngx-t-forms-mscoa-chart-toolbar.component-BUj7wGyx.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-D8GL9Aht.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-BUj7wGyx.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-config.component-Sz8VZ-vc.mjs → ngx-t-forms-mscoa-config.component-CBqzX9H7.mjs} +15 -10
- package/fesm2022/ngx-t-forms-mscoa-config.component-CBqzX9H7.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-Cr1HXTjG.mjs +520 -0
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-Cr1HXTjG.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CfZLcuuu.mjs +2336 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CfZLcuuu.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-B3WhBGlD.mjs → ngx-t-forms-ngx-t-forms-Dt4iPwb-.mjs} +1444 -146
- package/fesm2022/ngx-t-forms-ngx-t-forms-Dt4iPwb-.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-paginated-selection-table-CILBCL4K.mjs → ngx-t-forms-paginated-selection-table-lMTD1N6B.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-paginated-selection-table-CILBCL4K.mjs.map → ngx-t-forms-paginated-selection-table-lMTD1N6B.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-payload-template-editor.component-C8OasgK7.mjs → ngx-t-forms-payload-template-editor.component-Dx0pI0A1.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-payload-template-editor.component-C8OasgK7.mjs.map → ngx-t-forms-payload-template-editor.component-Dx0pI0A1.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-_yowsgF6.mjs → ngx-t-forms-pipeline-generator.component-VySkMHQI.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-_yowsgF6.mjs.map → ngx-t-forms-pipeline-generator.component-VySkMHQI.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-quill-input.component-BWq5cLY-.mjs → ngx-t-forms-quill-input.component-BLaPFcJE.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-quill-input.component-BWq5cLY-.mjs.map → ngx-t-forms-quill-input.component-BLaPFcJE.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-record-list-manager.component-C-lAzlO-.mjs → ngx-t-forms-record-list-manager.component-qlizX9F4.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-record-list-manager.component-C-lAzlO-.mjs.map → ngx-t-forms-record-list-manager.component-qlizX9F4.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-required-inputs.component-8cQr2QWm.mjs → ngx-t-forms-required-inputs.component-DY37Qrnj.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-required-inputs.component-8cQr2QWm.mjs.map → ngx-t-forms-required-inputs.component-DY37Qrnj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-Bhj9jcQk.mjs → ngx-t-forms-rest-api-call-setup.component-CLYe2Lf_.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-Bhj9jcQk.mjs.map → ngx-t-forms-rest-api-call-setup.component-CLYe2Lf_.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-section-report.component-CWCqrc7k.mjs → ngx-t-forms-section-report.component-foLHlD-I.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-section-report.component-CWCqrc7k.mjs.map → ngx-t-forms-section-report.component-foLHlD-I.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-select-input-element.component-BGD67Dnh.mjs → ngx-t-forms-select-input-element.component-CvrNfvXa.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-select-input-element.component-BGD67Dnh.mjs.map → ngx-t-forms-select-input-element.component-CvrNfvXa.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-ClXaOeXt.mjs → ngx-t-forms-selection-options-editor.component-D4luMX5c.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-ClXaOeXt.mjs.map → ngx-t-forms-selection-options-editor.component-D4luMX5c.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-Z-wkFzgQ.mjs → ngx-t-forms-textarea-input-element.component-BWyxWDvp.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-Z-wkFzgQ.mjs.map → ngx-t-forms-textarea-input-element.component-BWyxWDvp.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-CvR3-IjP.mjs → ngx-t-forms-toggle-input-element.component-CpYC2ivQ.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-CvR3-IjP.mjs.map → ngx-t-forms-toggle-input-element.component-CpYC2ivQ.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-token-text-input.component-vnOkP_CV.mjs → ngx-t-forms-token-text-input.component-BAjGepTM.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-token-text-input.component-vnOkP_CV.mjs.map → ngx-t-forms-token-text-input.component-BAjGepTM.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-DhuB7c63.mjs → ngx-t-forms-validators-config.component-DVB88bgW.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-validators-config.component-DhuB7c63.mjs.map → ngx-t-forms-validators-config.component-DVB88bgW.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-Dc4r01D7.mjs → ngx-t-forms-workflow-adjudication.component-LoF_fpHu.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-Dc4r01D7.mjs.map → ngx-t-forms-workflow-adjudication.component-LoF_fpHu.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/package.json +2 -2
- package/types/ngx-t-forms.d.ts +484 -13
- package/fesm2022/ngx-t-forms-index-yasuBvXP.mjs +0 -2
- package/fesm2022/ngx-t-forms-index-yasuBvXP.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-config.component-Sz8VZ-vc.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-COepe5G2.mjs +0 -447
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-COepe5G2.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-DlgTjJpj.mjs +0 -909
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-DlgTjJpj.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-B3WhBGlD.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-required-inputs.component-8cQr2QWm.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/required-inputs/required-inputs.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/required-inputs/required-inputs.component.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n computed,\r\n input,\r\n linkedSignal,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatRippleModule } from '@angular/material/core';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { FormsModule } from '@angular/forms';\r\nimport {\r\n ElementTypes,\r\n FormColumnInputs,\r\n InputDataTypes,\r\n MinInputMapInput,\r\n MinInputTypes,\r\n MinimumInputRequiredInterface,\r\n} from 'ngx-t-forms-types';\r\nimport { getInputIcon } from '../../../../shared/functions/getInputIcon';\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\n\r\n/** A required input decorated with the derived view-model fields the chip row renders. */\r\ninterface RequiredInputChip {\r\n readonly name: string;\r\n readonly linked: boolean;\r\n readonly active: boolean;\r\n}\r\n\r\n/** A mappable form input decorated with the derived view-model fields the list renders. */\r\ninterface MapTarget {\r\n readonly id: string;\r\n readonly label: string;\r\n readonly icon: string;\r\n readonly formControlName: string;\r\n readonly dataType: string;\r\n readonly selected: boolean;\r\n readonly mappable: boolean;\r\n readonly ariaLabel: string;\r\n}\r\n\r\n/**\r\n * Internal editor element for configuring a form's required (minimum) inputs.\r\n * Child of `t-dynamic-data-edit`, which supplies the field label, hint, and\r\n * validation errors — so this component owns only the chip row + edit content.\r\n *\r\n * Each required input can be handled three ways: a literal default value, a\r\n * single-input map (`MapTo`), or a multi-input filter (`MapDocFilter`).\r\n * Re-selecting the active handling method, chip, or a mapped input toggles it\r\n * off again.\r\n */\r\n@Component({\r\n selector: 'lib-required-inputs',\r\n imports: [\r\n FormsModule,\r\n MatButtonModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatListModule,\r\n MatRippleModule,\r\n MatSelectModule,\r\n EmptyStateComponent,\r\n ],\r\n templateUrl: './required-inputs.component.html',\r\n styleUrl: './required-inputs.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n 'class': 'lib-required-inputs',\r\n '[attr.id]': 'id()',\r\n },\r\n})\r\nexport class RequiredInputsComponent {\r\n /** Handling-method enum, exposed to the template. */\r\n protected readonly minInputTypes = MinInputTypes;\r\n\r\n /**\r\n * Required-input descriptors to render. Heterogeneous wrapper binding — the\r\n * parent feeds whatever the editor config holds; narrowing here would force\r\n * wrapper changes.\r\n */\r\n readonly value = input<readonly MinimumInputRequiredInterface[]>([]);\r\n\r\n /** All available form inputs the user can map a required input to. */\r\n readonly formInputs = input<readonly FormColumnInputs[]>([]);\r\n\r\n /** Disable user interaction. */\r\n readonly disabled = input<boolean>(false);\r\n\r\n /**\r\n * Validation errors passed down by the parent editor. Retained on the contract\r\n * but not rendered here — `t-dynamic-data-edit` owns error display.\r\n */\r\n readonly errors = input<IConfigElementError[] | undefined>([]);\r\n\r\n /** Optional id attribute supplied by the parent editor (used to disambiguate). */\r\n readonly id = input<string | undefined>(undefined);\r\n\r\n /** Emits the mutated required-input list whenever the user changes a mapping. */\r\n readonly valueChanged = output<MinimumInputRequiredInterface[]>();\r\n\r\n /**\r\n * Local, immutable working copy of `value`. Tracks the bound value (the parent\r\n * re-feeds it after each emit) but stays locally overridable; mutations always\r\n * produce a new array, and entries are cloned so the parent's array is never\r\n * mutated in place.\r\n */\r\n readonly #workingValue = linkedSignal<readonly MinimumInputRequiredInterface[]>(() =>\r\n this.value().map((item) => ({ ...item })),\r\n );\r\n\r\n /** Name of the required input currently open in the edit panel; `''` when none. */\r\n protected readonly activeInput = signal<string>('');\r\n\r\n /** The chip row: one entry per required input, with derived link/active state. */\r\n protected readonly chips = computed<readonly RequiredInputChip[]>(() => {\r\n const active = this.activeInput();\r\n return this.#workingValue().map((item) => ({\r\n name: item.name,\r\n linked: this.#isLinked(item),\r\n active: item.name === active,\r\n }));\r\n });\r\n\r\n /** The required input currently being edited, or `undefined` when none is active. */\r\n protected readonly inEdit = computed<MinimumInputRequiredInterface | undefined>(() => {\r\n const active = this.activeInput();\r\n if (!active) {\r\n return undefined;\r\n }\r\n return this.#workingValue().find((item) => item.name === active);\r\n });\r\n\r\n /** Handling method of the input in edit; `null` keeps the `mat-select` empty. */\r\n protected readonly activeType = computed<MinInputTypes | null>(() => {\r\n const type = this.inEdit()?.type;\r\n return type === MinInputTypes.Default ||\r\n type === MinInputTypes.MapTo ||\r\n type === MinInputTypes.MapDocFilter\r\n ? type\r\n : null;\r\n });\r\n\r\n /** Whether the edit panel should show the mappable-input list. */\r\n protected readonly showMapList = computed<boolean>(() => {\r\n const type = this.activeType();\r\n return type === MinInputTypes.MapTo || type === MinInputTypes.MapDocFilter;\r\n });\r\n\r\n /**\r\n * The list of mappable form inputs for the input in edit. Single-select\r\n * (`MapTo`) collapses to the chosen input once one is picked; multi-select\r\n * (`MapDocFilter`) always shows the full list with each chosen input flagged.\r\n */\r\n protected readonly mapTargets = computed<readonly MapTarget[]>(() => {\r\n const edit = this.inEdit();\r\n if (!edit) {\r\n return [];\r\n }\r\n const all = this.formInputs().map((item) => this.#toTarget(item, edit));\r\n if (edit.type === MinInputTypes.MapTo) {\r\n const selected = all.find((target) => target.selected);\r\n return selected ? [selected] : all;\r\n }\r\n return all;\r\n });\r\n\r\n /** Toggle the edit panel for a required input. Re-selecting the active one closes it. */\r\n protected toggleActive(name: string): void {\r\n if (this.disabled()) {\r\n return;\r\n }\r\n this.activeInput.update((current) => (current === name ? '' : name));\r\n }\r\n\r\n /** Close the edit panel without changing anything. */\r\n protected close(): void {\r\n this.activeInput.set('');\r\n }\r\n\r\n /** Choose (or, when re-selected, clear) the handling method for the input in edit. */\r\n protected selectType(type: MinInputTypes): void {\r\n this.#patchActive((current) => {\r\n if (current.type === type) {\r\n return { ...current, type: undefined, mapTo: undefined, defaultValue: undefined };\r\n }\r\n return {\r\n ...current,\r\n type,\r\n mapTo: type === MinInputTypes.MapDocFilter ? [] : undefined,\r\n defaultValue: type === MinInputTypes.Default ? current.defaultValue : undefined,\r\n };\r\n });\r\n }\r\n\r\n /** Update the literal default value of the input in edit. */\r\n protected setDefaultValue(value: string): void {\r\n this.#patchActive((current) => ({ ...current, defaultValue: value }));\r\n }\r\n\r\n /**\r\n * Map (or, when re-selected, unmap) a form input to the input in edit. `MapTo`\r\n * holds a single mapping; `MapDocFilter` accumulates a list.\r\n */\r\n protected toggleMap(target: MapTarget): void {\r\n if (this.disabled() || !target.mappable) {\r\n return;\r\n }\r\n const mapping = this.#toMapping(target);\r\n this.#patchActive((current) => {\r\n if (current.type === MinInputTypes.MapTo) {\r\n const existing = this.#asSingle(current.mapTo);\r\n const sameSelected = existing?.formControlName === mapping.formControlName;\r\n return { ...current, mapTo: sameSelected ? undefined : mapping };\r\n }\r\n if (current.type === MinInputTypes.MapDocFilter) {\r\n const list = this.#asList(current.mapTo);\r\n const has = list.some((m) => m.formControlName === mapping.formControlName);\r\n return {\r\n ...current,\r\n mapTo: has\r\n ? list.filter((m) => m.formControlName !== mapping.formControlName)\r\n : [...list, mapping],\r\n };\r\n }\r\n return current;\r\n });\r\n }\r\n\r\n /** Replace the active entry via `patch` and emit the new list. */\r\n #patchActive(\r\n patch: (current: MinimumInputRequiredInterface) => MinimumInputRequiredInterface,\r\n ): void {\r\n const active = this.activeInput();\r\n let changed = false;\r\n const next = this.#workingValue().map((item) => {\r\n if (item.name !== active) {\r\n return item;\r\n }\r\n changed = true;\r\n return patch(item);\r\n });\r\n if (!changed) {\r\n return;\r\n }\r\n this.#workingValue.set(next);\r\n this.valueChanged.emit([...next]);\r\n }\r\n\r\n #isLinked(item: MinimumInputRequiredInterface): boolean {\r\n if (item.type === MinInputTypes.Default) {\r\n return !!item.defaultValue;\r\n }\r\n if (item.type === MinInputTypes.MapTo) {\r\n return !!this.#asSingle(item.mapTo);\r\n }\r\n if (item.type === MinInputTypes.MapDocFilter) {\r\n return this.#asList(item.mapTo).length > 0;\r\n }\r\n return false;\r\n }\r\n\r\n #toTarget(item: FormColumnInputs, edit: MinimumInputRequiredInterface): MapTarget {\r\n const mappable = item.element !== ElementTypes.SectionTitle;\r\n const selected = this.#isMapped(edit, item.formControlName);\r\n return {\r\n id: item.id,\r\n label: item.label,\r\n icon: getInputIcon(item.element),\r\n formControlName: item.formControlName,\r\n dataType: item.dataType ?? '',\r\n selected,\r\n mappable,\r\n ariaLabel: `${item.label}.${mappable ? '' : ' Not mappable.'}`,\r\n };\r\n }\r\n\r\n #isMapped(edit: MinimumInputRequiredInterface, formControlName: string): boolean {\r\n if (edit.type === MinInputTypes.MapTo) {\r\n return this.#asSingle(edit.mapTo)?.formControlName === formControlName;\r\n }\r\n if (edit.type === MinInputTypes.MapDocFilter) {\r\n return this.#asList(edit.mapTo).some((m) => m.formControlName === formControlName);\r\n }\r\n return false;\r\n }\r\n\r\n #toMapping(target: MapTarget): MinInputMapInput {\r\n const source = this.formInputs().find((item) => item.id === target.id);\r\n return {\r\n formControlName: target.formControlName,\r\n dataType: source?.dataType ?? InputDataTypes.String,\r\n element: source?.element ?? ElementTypes.Input,\r\n inputId: target.id,\r\n };\r\n }\r\n\r\n #asSingle(\r\n mapTo: MinInputMapInput | readonly MinInputMapInput[] | undefined,\r\n ): MinInputMapInput | undefined {\r\n if (!mapTo || Array.isArray(mapTo)) {\r\n return undefined;\r\n }\r\n // `Array.isArray` does not narrow a `readonly[]` out of the union, so assert\r\n // the remaining single-mapping shape after the guard.\r\n return mapTo as MinInputMapInput;\r\n }\r\n\r\n #asList(\r\n mapTo: MinInputMapInput | readonly MinInputMapInput[] | undefined,\r\n ): readonly MinInputMapInput[] {\r\n return Array.isArray(mapTo) ? mapTo : [];\r\n }\r\n}\r\n","@if (chips().length) {\r\n<div class=\"lib-required-inputs__chips\" role=\"list\" aria-label=\"Required inputs\">\r\n @for (chip of chips(); track chip.name) {\r\n <button\r\n type=\"button\"\r\n role=\"listitem\"\r\n class=\"lib-required-inputs__chip\"\r\n [class.lib-required-inputs__chip--linked]=\"chip.linked\"\r\n [class.lib-required-inputs__chip--active]=\"chip.active\"\r\n [disabled]=\"disabled()\"\r\n [attr.aria-pressed]=\"chip.active\"\r\n [attr.aria-label]=\"chip.name + (chip.linked ? ', linked' : ', not linked')\"\r\n (click)=\"toggleActive(chip.name)\">\r\n <span class=\"lib-required-inputs__chip-label\">{{ chip.name }}</span>\r\n <mat-icon class=\"lib-required-inputs__chip-icon\" aria-hidden=\"true\">\r\n {{ chip.linked ? 'link' : 'link_off' }}\r\n </mat-icon>\r\n </button>\r\n }\r\n</div>\r\n} @else {\r\n<lib-empty-state icon=\"link_off\" message=\"No required inputs to configure.\" />\r\n}\r\n\r\n@if (inEdit(); as edit) {\r\n<div class=\"lib-required-inputs__panel\">\r\n <mat-form-field\r\n class=\"lib-required-inputs__field\"\r\n appearance=\"outline\"\r\n subscriptSizing=\"dynamic\">\r\n <mat-label>Input handling method</mat-label>\r\n <mat-select\r\n [value]=\"activeType()\"\r\n [disabled]=\"disabled()\"\r\n (selectionChange)=\"selectType($event.value)\">\r\n <mat-option [value]=\"minInputTypes.Default\">Default value</mat-option>\r\n <mat-option [value]=\"minInputTypes.MapTo\">Map to a form input</mat-option>\r\n <mat-option [value]=\"minInputTypes.MapDocFilter\">Filter by an input value</mat-option>\r\n </mat-select>\r\n <mat-hint>Choose how this required input is resolved</mat-hint>\r\n </mat-form-field>\r\n\r\n @if (activeType() === minInputTypes.Default) {\r\n <mat-form-field\r\n class=\"lib-required-inputs__field\"\r\n appearance=\"outline\"\r\n subscriptSizing=\"dynamic\">\r\n <mat-label>Default value</mat-label>\r\n <input\r\n matInput\r\n [ngModel]=\"edit.defaultValue\"\r\n [disabled]=\"disabled()\"\r\n (ngModelChange)=\"setDefaultValue($event)\"\r\n placeholder=\"Enter a default value\" />\r\n <mat-hint>Used when no value is supplied at runtime</mat-hint>\r\n </mat-form-field>\r\n }\r\n\r\n @if (showMapList()) {\r\n <p class=\"lib-required-inputs__list-label\">\r\n Link <strong>{{ activeInput() }}</strong> to a form input\r\n </p>\r\n\r\n @if (mapTargets().length) {\r\n <mat-nav-list class=\"lib-required-inputs__list\">\r\n {{mapTargets().length}}\r\n @for (target of mapTargets(); track target.id) {\r\n <mat-list-item\r\n class=\"lib-required-inputs__item\"\r\n matRipple\r\n role=\"button\"\r\n [disabled]=\"disabled() || !target.mappable\"\r\n [activated]=\"target.selected\"\r\n [attr.aria-pressed]=\"target.selected\"\r\n [attr.aria-label]=\"target.ariaLabel\"\r\n (click)=\"toggleMap(target); $event.stopPropagation()\">\r\n <mat-icon\r\n matListItemAvatar\r\n class=\"lib-required-inputs__avatar\"\r\n aria-hidden=\"true\">\r\n {{ target.icon }}\r\n </mat-icon>\r\n <span matListItemTitle class=\"lib-required-inputs__item-title\">{{ target.label }}</span>\r\n <span matListItemLine class=\"lib-required-inputs__item-meta\">\r\n <span>{{ target.formControlName }}</span>\r\n @if (target.dataType) {\r\n <span>{{ target.dataType }}</span>\r\n }\r\n </span>\r\n <mat-icon\r\n matListItemMeta\r\n class=\"lib-required-inputs__indicator\"\r\n [class.lib-required-inputs__indicator--on]=\"target.selected\"\r\n aria-hidden=\"true\">\r\n {{ target.selected ? 'check_circle' : 'radio_button_unchecked' }}\r\n </mat-icon>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n } @else {\r\n <lib-empty-state icon=\"add_link\" message=\"Add form inputs before mapping this input.\" />\r\n }\r\n }\r\n\r\n <div class=\"lib-required-inputs__actions\">\r\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"close()\">Done</button>\r\n </div>\r\n</div>\r\n}\r\n"],"names":["i3","i4"],"mappings":";;;;;;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A,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACb,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,MAAA,EAAA,CAAA,gBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,iBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,kBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACf,eAAe,gtBACf,mBAAmB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAWV,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAtBnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EAAA,OAAA,EACtB;wBACP,WAAW;wBACX,eAAe;wBACf,kBAAkB;wBAClB,aAAa;wBACb,cAAc;wBACd,aAAa;wBACb,eAAe;wBACf,eAAe;wBACf,mBAAmB;AACpB,qBAAA,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,OAAO,EAAE,qBAAqB;AAC9B,wBAAA,WAAW,EAAE,MAAM;AACpB,qBAAA,EAAA,QAAA,EAAA,ylIAAA,EAAA,MAAA,EAAA,CAAA,ylHAAA,CAAA,EAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-required-inputs.component-DY37Qrnj.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/required-inputs/required-inputs.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/required-inputs/required-inputs.component.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n computed,\r\n input,\r\n linkedSignal,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatRippleModule } from '@angular/material/core';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { FormsModule } from '@angular/forms';\r\nimport {\r\n ElementTypes,\r\n FormColumnInputs,\r\n InputDataTypes,\r\n MinInputMapInput,\r\n MinInputTypes,\r\n MinimumInputRequiredInterface,\r\n} from 'ngx-t-forms-types';\r\nimport { getInputIcon } from '../../../../shared/functions/getInputIcon';\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\n\r\n/** A required input decorated with the derived view-model fields the chip row renders. */\r\ninterface RequiredInputChip {\r\n readonly name: string;\r\n readonly linked: boolean;\r\n readonly active: boolean;\r\n}\r\n\r\n/** A mappable form input decorated with the derived view-model fields the list renders. */\r\ninterface MapTarget {\r\n readonly id: string;\r\n readonly label: string;\r\n readonly icon: string;\r\n readonly formControlName: string;\r\n readonly dataType: string;\r\n readonly selected: boolean;\r\n readonly mappable: boolean;\r\n readonly ariaLabel: string;\r\n}\r\n\r\n/**\r\n * Internal editor element for configuring a form's required (minimum) inputs.\r\n * Child of `t-dynamic-data-edit`, which supplies the field label, hint, and\r\n * validation errors — so this component owns only the chip row + edit content.\r\n *\r\n * Each required input can be handled three ways: a literal default value, a\r\n * single-input map (`MapTo`), or a multi-input filter (`MapDocFilter`).\r\n * Re-selecting the active handling method, chip, or a mapped input toggles it\r\n * off again.\r\n */\r\n@Component({\r\n selector: 'lib-required-inputs',\r\n imports: [\r\n FormsModule,\r\n MatButtonModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatListModule,\r\n MatRippleModule,\r\n MatSelectModule,\r\n EmptyStateComponent,\r\n ],\r\n templateUrl: './required-inputs.component.html',\r\n styleUrl: './required-inputs.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n 'class': 'lib-required-inputs',\r\n '[attr.id]': 'id()',\r\n },\r\n})\r\nexport class RequiredInputsComponent {\r\n /** Handling-method enum, exposed to the template. */\r\n protected readonly minInputTypes = MinInputTypes;\r\n\r\n /**\r\n * Required-input descriptors to render. Heterogeneous wrapper binding — the\r\n * parent feeds whatever the editor config holds; narrowing here would force\r\n * wrapper changes.\r\n */\r\n readonly value = input<readonly MinimumInputRequiredInterface[]>([]);\r\n\r\n /** All available form inputs the user can map a required input to. */\r\n readonly formInputs = input<readonly FormColumnInputs[]>([]);\r\n\r\n /** Disable user interaction. */\r\n readonly disabled = input<boolean>(false);\r\n\r\n /**\r\n * Validation errors passed down by the parent editor. Retained on the contract\r\n * but not rendered here — `t-dynamic-data-edit` owns error display.\r\n */\r\n readonly errors = input<IConfigElementError[] | undefined>([]);\r\n\r\n /** Optional id attribute supplied by the parent editor (used to disambiguate). */\r\n readonly id = input<string | undefined>(undefined);\r\n\r\n /** Emits the mutated required-input list whenever the user changes a mapping. */\r\n readonly valueChanged = output<MinimumInputRequiredInterface[]>();\r\n\r\n /**\r\n * Local, immutable working copy of `value`. Tracks the bound value (the parent\r\n * re-feeds it after each emit) but stays locally overridable; mutations always\r\n * produce a new array, and entries are cloned so the parent's array is never\r\n * mutated in place.\r\n */\r\n readonly #workingValue = linkedSignal<readonly MinimumInputRequiredInterface[]>(() =>\r\n this.value().map((item) => ({ ...item })),\r\n );\r\n\r\n /** Name of the required input currently open in the edit panel; `''` when none. */\r\n protected readonly activeInput = signal<string>('');\r\n\r\n /** The chip row: one entry per required input, with derived link/active state. */\r\n protected readonly chips = computed<readonly RequiredInputChip[]>(() => {\r\n const active = this.activeInput();\r\n return this.#workingValue().map((item) => ({\r\n name: item.name,\r\n linked: this.#isLinked(item),\r\n active: item.name === active,\r\n }));\r\n });\r\n\r\n /** The required input currently being edited, or `undefined` when none is active. */\r\n protected readonly inEdit = computed<MinimumInputRequiredInterface | undefined>(() => {\r\n const active = this.activeInput();\r\n if (!active) {\r\n return undefined;\r\n }\r\n return this.#workingValue().find((item) => item.name === active);\r\n });\r\n\r\n /** Handling method of the input in edit; `null` keeps the `mat-select` empty. */\r\n protected readonly activeType = computed<MinInputTypes | null>(() => {\r\n const type = this.inEdit()?.type;\r\n return type === MinInputTypes.Default ||\r\n type === MinInputTypes.MapTo ||\r\n type === MinInputTypes.MapDocFilter\r\n ? type\r\n : null;\r\n });\r\n\r\n /** Whether the edit panel should show the mappable-input list. */\r\n protected readonly showMapList = computed<boolean>(() => {\r\n const type = this.activeType();\r\n return type === MinInputTypes.MapTo || type === MinInputTypes.MapDocFilter;\r\n });\r\n\r\n /**\r\n * The list of mappable form inputs for the input in edit. Single-select\r\n * (`MapTo`) collapses to the chosen input once one is picked; multi-select\r\n * (`MapDocFilter`) always shows the full list with each chosen input flagged.\r\n */\r\n protected readonly mapTargets = computed<readonly MapTarget[]>(() => {\r\n const edit = this.inEdit();\r\n if (!edit) {\r\n return [];\r\n }\r\n const all = this.formInputs().map((item) => this.#toTarget(item, edit));\r\n if (edit.type === MinInputTypes.MapTo) {\r\n const selected = all.find((target) => target.selected);\r\n return selected ? [selected] : all;\r\n }\r\n return all;\r\n });\r\n\r\n /** Toggle the edit panel for a required input. Re-selecting the active one closes it. */\r\n protected toggleActive(name: string): void {\r\n if (this.disabled()) {\r\n return;\r\n }\r\n this.activeInput.update((current) => (current === name ? '' : name));\r\n }\r\n\r\n /** Close the edit panel without changing anything. */\r\n protected close(): void {\r\n this.activeInput.set('');\r\n }\r\n\r\n /** Choose (or, when re-selected, clear) the handling method for the input in edit. */\r\n protected selectType(type: MinInputTypes): void {\r\n this.#patchActive((current) => {\r\n if (current.type === type) {\r\n return { ...current, type: undefined, mapTo: undefined, defaultValue: undefined };\r\n }\r\n return {\r\n ...current,\r\n type,\r\n mapTo: type === MinInputTypes.MapDocFilter ? [] : undefined,\r\n defaultValue: type === MinInputTypes.Default ? current.defaultValue : undefined,\r\n };\r\n });\r\n }\r\n\r\n /** Update the literal default value of the input in edit. */\r\n protected setDefaultValue(value: string): void {\r\n this.#patchActive((current) => ({ ...current, defaultValue: value }));\r\n }\r\n\r\n /**\r\n * Map (or, when re-selected, unmap) a form input to the input in edit. `MapTo`\r\n * holds a single mapping; `MapDocFilter` accumulates a list.\r\n */\r\n protected toggleMap(target: MapTarget): void {\r\n if (this.disabled() || !target.mappable) {\r\n return;\r\n }\r\n const mapping = this.#toMapping(target);\r\n this.#patchActive((current) => {\r\n if (current.type === MinInputTypes.MapTo) {\r\n const existing = this.#asSingle(current.mapTo);\r\n const sameSelected = existing?.formControlName === mapping.formControlName;\r\n return { ...current, mapTo: sameSelected ? undefined : mapping };\r\n }\r\n if (current.type === MinInputTypes.MapDocFilter) {\r\n const list = this.#asList(current.mapTo);\r\n const has = list.some((m) => m.formControlName === mapping.formControlName);\r\n return {\r\n ...current,\r\n mapTo: has\r\n ? list.filter((m) => m.formControlName !== mapping.formControlName)\r\n : [...list, mapping],\r\n };\r\n }\r\n return current;\r\n });\r\n }\r\n\r\n /** Replace the active entry via `patch` and emit the new list. */\r\n #patchActive(\r\n patch: (current: MinimumInputRequiredInterface) => MinimumInputRequiredInterface,\r\n ): void {\r\n const active = this.activeInput();\r\n let changed = false;\r\n const next = this.#workingValue().map((item) => {\r\n if (item.name !== active) {\r\n return item;\r\n }\r\n changed = true;\r\n return patch(item);\r\n });\r\n if (!changed) {\r\n return;\r\n }\r\n this.#workingValue.set(next);\r\n this.valueChanged.emit([...next]);\r\n }\r\n\r\n #isLinked(item: MinimumInputRequiredInterface): boolean {\r\n if (item.type === MinInputTypes.Default) {\r\n return !!item.defaultValue;\r\n }\r\n if (item.type === MinInputTypes.MapTo) {\r\n return !!this.#asSingle(item.mapTo);\r\n }\r\n if (item.type === MinInputTypes.MapDocFilter) {\r\n return this.#asList(item.mapTo).length > 0;\r\n }\r\n return false;\r\n }\r\n\r\n #toTarget(item: FormColumnInputs, edit: MinimumInputRequiredInterface): MapTarget {\r\n const mappable = item.element !== ElementTypes.SectionTitle;\r\n const selected = this.#isMapped(edit, item.formControlName);\r\n return {\r\n id: item.id,\r\n label: item.label,\r\n icon: getInputIcon(item.element),\r\n formControlName: item.formControlName,\r\n dataType: item.dataType ?? '',\r\n selected,\r\n mappable,\r\n ariaLabel: `${item.label}.${mappable ? '' : ' Not mappable.'}`,\r\n };\r\n }\r\n\r\n #isMapped(edit: MinimumInputRequiredInterface, formControlName: string): boolean {\r\n if (edit.type === MinInputTypes.MapTo) {\r\n return this.#asSingle(edit.mapTo)?.formControlName === formControlName;\r\n }\r\n if (edit.type === MinInputTypes.MapDocFilter) {\r\n return this.#asList(edit.mapTo).some((m) => m.formControlName === formControlName);\r\n }\r\n return false;\r\n }\r\n\r\n #toMapping(target: MapTarget): MinInputMapInput {\r\n const source = this.formInputs().find((item) => item.id === target.id);\r\n return {\r\n formControlName: target.formControlName,\r\n dataType: source?.dataType ?? InputDataTypes.String,\r\n element: source?.element ?? ElementTypes.Input,\r\n inputId: target.id,\r\n };\r\n }\r\n\r\n #asSingle(\r\n mapTo: MinInputMapInput | readonly MinInputMapInput[] | undefined,\r\n ): MinInputMapInput | undefined {\r\n if (!mapTo || Array.isArray(mapTo)) {\r\n return undefined;\r\n }\r\n // `Array.isArray` does not narrow a `readonly[]` out of the union, so assert\r\n // the remaining single-mapping shape after the guard.\r\n return mapTo as MinInputMapInput;\r\n }\r\n\r\n #asList(\r\n mapTo: MinInputMapInput | readonly MinInputMapInput[] | undefined,\r\n ): readonly MinInputMapInput[] {\r\n return Array.isArray(mapTo) ? mapTo : [];\r\n }\r\n}\r\n","@if (chips().length) {\r\n<div class=\"lib-required-inputs__chips\" role=\"list\" aria-label=\"Required inputs\">\r\n @for (chip of chips(); track chip.name) {\r\n <button\r\n type=\"button\"\r\n role=\"listitem\"\r\n class=\"lib-required-inputs__chip\"\r\n [class.lib-required-inputs__chip--linked]=\"chip.linked\"\r\n [class.lib-required-inputs__chip--active]=\"chip.active\"\r\n [disabled]=\"disabled()\"\r\n [attr.aria-pressed]=\"chip.active\"\r\n [attr.aria-label]=\"chip.name + (chip.linked ? ', linked' : ', not linked')\"\r\n (click)=\"toggleActive(chip.name)\">\r\n <span class=\"lib-required-inputs__chip-label\">{{ chip.name }}</span>\r\n <mat-icon class=\"lib-required-inputs__chip-icon\" aria-hidden=\"true\">\r\n {{ chip.linked ? 'link' : 'link_off' }}\r\n </mat-icon>\r\n </button>\r\n }\r\n</div>\r\n} @else {\r\n<lib-empty-state icon=\"link_off\" message=\"No required inputs to configure.\" />\r\n}\r\n\r\n@if (inEdit(); as edit) {\r\n<div class=\"lib-required-inputs__panel\">\r\n <mat-form-field\r\n class=\"lib-required-inputs__field\"\r\n appearance=\"outline\"\r\n subscriptSizing=\"dynamic\">\r\n <mat-label>Input handling method</mat-label>\r\n <mat-select\r\n [value]=\"activeType()\"\r\n [disabled]=\"disabled()\"\r\n (selectionChange)=\"selectType($event.value)\">\r\n <mat-option [value]=\"minInputTypes.Default\">Default value</mat-option>\r\n <mat-option [value]=\"minInputTypes.MapTo\">Map to a form input</mat-option>\r\n <mat-option [value]=\"minInputTypes.MapDocFilter\">Filter by an input value</mat-option>\r\n </mat-select>\r\n <mat-hint>Choose how this required input is resolved</mat-hint>\r\n </mat-form-field>\r\n\r\n @if (activeType() === minInputTypes.Default) {\r\n <mat-form-field\r\n class=\"lib-required-inputs__field\"\r\n appearance=\"outline\"\r\n subscriptSizing=\"dynamic\">\r\n <mat-label>Default value</mat-label>\r\n <input\r\n matInput\r\n [ngModel]=\"edit.defaultValue\"\r\n [disabled]=\"disabled()\"\r\n (ngModelChange)=\"setDefaultValue($event)\"\r\n placeholder=\"Enter a default value\" />\r\n <mat-hint>Used when no value is supplied at runtime</mat-hint>\r\n </mat-form-field>\r\n }\r\n\r\n @if (showMapList()) {\r\n <p class=\"lib-required-inputs__list-label\">\r\n Link <strong>{{ activeInput() }}</strong> to a form input\r\n </p>\r\n\r\n @if (mapTargets().length) {\r\n <mat-nav-list class=\"lib-required-inputs__list\">\r\n {{mapTargets().length}}\r\n @for (target of mapTargets(); track target.id) {\r\n <mat-list-item\r\n class=\"lib-required-inputs__item\"\r\n matRipple\r\n role=\"button\"\r\n [disabled]=\"disabled() || !target.mappable\"\r\n [activated]=\"target.selected\"\r\n [attr.aria-pressed]=\"target.selected\"\r\n [attr.aria-label]=\"target.ariaLabel\"\r\n (click)=\"toggleMap(target); $event.stopPropagation()\">\r\n <mat-icon\r\n matListItemAvatar\r\n class=\"lib-required-inputs__avatar\"\r\n aria-hidden=\"true\">\r\n {{ target.icon }}\r\n </mat-icon>\r\n <span matListItemTitle class=\"lib-required-inputs__item-title\">{{ target.label }}</span>\r\n <span matListItemLine class=\"lib-required-inputs__item-meta\">\r\n <span>{{ target.formControlName }}</span>\r\n @if (target.dataType) {\r\n <span>{{ target.dataType }}</span>\r\n }\r\n </span>\r\n <mat-icon\r\n matListItemMeta\r\n class=\"lib-required-inputs__indicator\"\r\n [class.lib-required-inputs__indicator--on]=\"target.selected\"\r\n aria-hidden=\"true\">\r\n {{ target.selected ? 'check_circle' : 'radio_button_unchecked' }}\r\n </mat-icon>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n } @else {\r\n <lib-empty-state icon=\"add_link\" message=\"Add form inputs before mapping this input.\" />\r\n }\r\n }\r\n\r\n <div class=\"lib-required-inputs__actions\">\r\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"close()\">Done</button>\r\n </div>\r\n</div>\r\n}\r\n"],"names":["i3","i4"],"mappings":";;;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ulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { m as deriveDefaultPayloadTemplate, n as collectHeaderTemplateInputIds, o as collectQueryTemplateInputIds, q as collectTemplateInputIds, u as collectMinInputDepIds, v as resolveHeaderTemplate, w as resolveQueryTemplate, x as resolvePayloadTemplate, y as returnMappedData, z as mergeQueryOptions, C as mergeHeaderOptions, G as PostmanCollectionLoaderService, H as TreeComponent, I as convertPostmanFolderItemsToTree, _ as _isEqual, E as EmptyStateComponent, l as ErrorListComponent } from './ngx-t-forms-ngx-t-forms-
|
|
3
|
+
import { m as deriveDefaultPayloadTemplate, n as collectHeaderTemplateInputIds, o as collectQueryTemplateInputIds, q as collectTemplateInputIds, u as collectMinInputDepIds, v as resolveHeaderTemplate, w as resolveQueryTemplate, x as resolvePayloadTemplate, y as returnMappedData, z as mergeQueryOptions, C as mergeHeaderOptions, G as PostmanCollectionLoaderService, H as TreeComponent, I as convertPostmanFolderItemsToTree, _ as _isEqual, E as EmptyStateComponent, l as ErrorListComponent } from './ngx-t-forms-ngx-t-forms-Dt4iPwb-.mjs';
|
|
4
4
|
import { JsDataTypes, DataSources } from 'ngx-t-forms-types';
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
@@ -865,4 +865,4 @@ var restApiCallSetup_component = /*#__PURE__*/Object.freeze({
|
|
|
865
865
|
});
|
|
866
866
|
|
|
867
867
|
export { RestApiCallSetupComponent as R, payloadDefaultOf as a, bodyModeOf as b, minInputsOf as c, docsHtmlOf as d, deriveConfiguredRequest as e, dependencyLabels as f, restApiCallSetup_component as g, headerCountOf as h, methodColorOf as m, paramCountOf as p, readinessOf as r, sendsBody as s, waitsForLabels as w };
|
|
868
|
-
//# sourceMappingURL=ngx-t-forms-rest-api-call-setup.component-
|
|
868
|
+
//# sourceMappingURL=ngx-t-forms-rest-api-call-setup.component-CLYe2Lf_.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-rest-api-call-setup.component-Bhj9jcQk.mjs","sources":["../../../projects/ngx-t-forms/src/lib/shared/functions/postman/postman-item-to-fetch-config.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/api-endpoint-config/api-endpoint-config.logic.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/postman-collections/functions/filterCollectionItems.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/postman-collections/functions/methodColors.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/postman-collections/postman-collections.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/postman-collections/postman-collections.component.html","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/rest-api-call-setup/rest-api-call-setup.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/rest-api-call-setup/rest-api-call-setup.component.html"],"sourcesContent":["/**\n * @file Maps a Postman collection item to a stored\n * `APIDataFetchingConfigurationInterface`.\n *\n * Extracted from `rest-api-call-setup.component.ts`, where it was the whole of\n * `nodeSelectionChanged` plus six module-local helpers and two private methods.\n * Nothing outside that component could produce the configuration a human\n * produces by picking an endpoint, which made every other caller either\n * duplicate the mapping — guaranteed to drift from the editor — or hand-author\n * configs. The AI form-builder's endpoint catalog is the caller that forced the\n * issue: it needs complete stored configurations, and the library already\n * fetches the collection they would come from.\n *\n * Pure by construction: no Angular, no injection, no I/O, no component state.\n * The component keeps ownership of what to DO with the result (set its local\n * value, emit it); this module only decides what the result is.\n */\nimport {\n DataSources,\n JsDataTypes,\n type APIDataFetchingConfigurationInterface,\n type HeaderTemplate,\n type IFolderItem,\n type MinimumInputRequiredInterface,\n type QueryTemplate,\n} from 'ngx-t-forms-types';\n\n/**\n * Parses a Postman raw request body into a plain object.\n *\n * Returns `{}` for an absent, blank or non-JSON body (a `graphql` / `formdata`\n * mode, or raw text with comments). Nesting and key names are preserved exactly\n * as authored — this is the document template mode seeds from.\n *\n * @param raw - `request.body.raw` from the Postman collection.\n * @returns The parsed body, or `{}` when there is nothing usable.\n */\nfunction parseRawBody(raw: string | undefined): Record<string, unknown> {\n if (typeof raw !== 'string' || raw.trim() === '') return {};\n try {\n const parsed: unknown = JSON.parse(raw);\n return parsed !== null && typeof parsed === 'object' ? (parsed as Record<string, unknown>) : {};\n } catch {\n return {};\n }\n}\n\n/** True when a parsed body carries at least one key — i.e. it is worth persisting. */\nfunction isNonEmptyBody(body: Record<string, unknown>): boolean {\n return Object.keys(body).length > 0;\n}\n\n/**\n * Collects the enabled entries of a Postman `[{ key, value, disabled? }]` list.\n *\n * A `disabled` entry is one the author deliberately switched off in the\n * collection, so it is skipped rather than carried into the form config —\n * mirroring what Postman itself would send.\n *\n * Headers and URL query params have the identical shape and the identical rule,\n * so they share one implementation here; they were two copies of the same loop\n * in the component.\n *\n * @param entries - `request.header` or `request.url.query`.\n * @returns The captured `name → value` map (empty when there is nothing usable).\n */\nfunction parseKeyValueList(entries: unknown): Record<string, string> {\n if (!Array.isArray(entries)) return {};\n\n const captured: Record<string, string> = {};\n for (const entry of entries as Array<{ key?: unknown; value?: unknown; disabled?: unknown }>) {\n if (entry?.disabled === true) continue;\n const key = typeof entry?.key === 'string' ? entry.key.trim() : '';\n if (key === '') continue;\n captured[key] = typeof entry.value === 'string' ? entry.value : String(entry?.value ?? '');\n }\n return captured;\n}\n\n/**\n * Strips the query string from a captured endpoint URL — but ONLY when the\n * query was captured structurally (so nothing is lost): once the params live in\n * `capturedQuery`/`queryTemplate`, leaving them in the URL as text would send\n * every param twice. A URL whose `?…` had no structured `url.query` entries is\n * left verbatim — the text is then the only record of it.\n *\n * @param raw - `request.url.raw` from the Postman collection.\n * @param capturedQuery - What {@link parseKeyValueList} extracted from the query.\n * @returns The URL to persist as `httpEndPoint`.\n */\nfunction stripCapturedQueryString(raw: string, capturedQuery: QueryTemplate): string {\n if (Object.keys(capturedQuery).length === 0) return raw;\n const cut = raw.indexOf('?');\n return cut === -1 ? raw : raw.slice(0, cut);\n}\n\n/** Maps a JS `typeof` string to the shared {@link JsDataTypes} enum member. */\nfunction toJsDataType(value: unknown): JsDataTypes {\n switch (typeof value) {\n case 'string':\n return JsDataTypes.String;\n case 'number':\n return JsDataTypes.Number;\n case 'bigint':\n return JsDataTypes.BigInt;\n case 'boolean':\n return JsDataTypes.Boolean;\n case 'symbol':\n return JsDataTypes.Symbol;\n case 'function':\n return JsDataTypes.Function;\n case 'object':\n return JsDataTypes.Object;\n default:\n return JsDataTypes.Undefined;\n }\n}\n\n/** One `minimumInputRequired` entry. */\nfunction toRequiredInput(\n name: string,\n value: unknown,\n primaryKey: boolean,\n): MinimumInputRequiredInterface {\n return { name, type: toJsDataType(value), primaryKey };\n}\n\n/**\n * Derives the body-bearing endpoint's required inputs from its request body.\n * Top-level keys are primary; entries under `data` are secondary (non-primary).\n *\n * **Deliberately flat.** `MinimumInputRequiredInterface` has a `name`, not a\n * path, so a nested value can only ever become one `JsDataTypes.Object` entry —\n * mapping `filter.archive` is not expressible here. That is what template mode\n * is for, and why the untouched `requestBody` is captured alongside this: it is\n * the only faithful record of a nested payload.\n */\nfunction extractRequiredInputs(\n requestBody: Record<string, unknown>,\n): MinimumInputRequiredInterface[] {\n const { data, ...rest } = requestBody;\n const dataEntries: Record<string, unknown> = data && typeof data === 'object' ? { ...data } : {};\n\n const primaryKeys = Object.entries(rest).map(([key, val]) => toRequiredInput(key, val, true));\n const secondaryKeys = Object.entries(dataEntries).map(([key, val]) =>\n toRequiredInput(key, val, false),\n );\n\n return [...primaryKeys, ...secondaryKeys];\n}\n\n/**\n * @public\n *\n * Builds the stored fetch configuration for one Postman collection item.\n *\n * @param node - A node from the collection tree. A FOLDER node — the only other\n * thing the picker can emit — has no `request`, so that check alone is the\n * correct guard, and it is why this returns `undefined` rather than a partial\n * configuration: a half-built config persisted as if it were real is the\n * failure this whole mapping exists to avoid.\n * @returns The configuration to persist, or `undefined` when the node carries\n * no request.\n *\n * @example\n * const config = postmanItemToFetchConfig(node);\n * if (config) this.valueChanged.emit(config);\n */\nexport function postmanItemToFetchConfig(\n node: IFolderItem,\n): APIDataFetchingConfigurationInterface | undefined {\n const { id, name, request } = node;\n\n if (!request) return undefined;\n\n const requestBody = parseRawBody(request.body?.raw);\n const capturedHeaders: HeaderTemplate = parseKeyValueList(request.header);\n const capturedQuery: QueryTemplate = parseKeyValueList(request.url.query);\n\n // PUT is body-bearing exactly like POST (it rides the POST branch family at\n // runtime), so it seeds the same required-input mapping.\n const sendsBody = request.method === 'POST' || request.method === 'PUT';\n const minimumInputRequired: MinimumInputRequiredInterface[] = sendsBody\n ? extractRequiredInputs(requestBody)\n : [];\n\n return {\n _id: id,\n name,\n // Structurally-captured query params are stripped from the URL text so a\n // param never rides twice (once as literal text, once via queryTemplate).\n httpEndPoint: stripCapturedQueryString(request.url.raw, capturedQuery),\n httpMethod: request.method,\n source: DataSources.Api,\n postFormData: sendsBody,\n // The endpoint's own headers, kept so the header-template editor opens on\n // what the API declares. Omitted when it declared none, so the editor falls\n // back to its skeleton rather than persisting an empty map.\n ...(Object.keys(capturedHeaders).length > 0 ? { capturedHeaders } : {}),\n // Same contract for the URL's own query params → the query-template editor.\n ...(Object.keys(capturedQuery).length > 0 ? { capturedQuery } : {}),\n // The endpoint's Postman documentation, verbatim → the Docs tab.\n ...(request.description?.trim() ? { capturedDocs: request.description } : {}),\n backEndConfig: {\n minimumInputRequired,\n // The endpoint's untouched body is the ONLY faithful record of a nested\n // payload (`minimumInputRequired` entries carry a `name`, not a path), so\n // it is what seeds template mode. Captured for every method that actually\n // sends one — keyed on the body being present, not on `method === 'POST'`,\n // because PUT/PATCH bodies are equally real. Omitted entirely when there\n // is nothing to store, so `deriveDefaultPayloadTemplate` falls back cleanly.\n ...(isNonEmptyBody(requestBody)\n ? {\n requestBody: requestBody as APIDataFetchingConfigurationInterface['backEndConfig']['requestBody'],\n }\n : {}),\n },\n };\n}\n","import type {\n APIDataFetchingConfigurationInterface,\n FormColumnInputs,\n MinimumInputRequiredInterface,\n PayloadTemplate,\n RequestBodyMode,\n} from 'ngx-t-forms-types';\n\nimport {\n collectHeaderTemplateInputIds,\n collectQueryTemplateInputIds,\n mergeHeaderOptions,\n mergeQueryOptions,\n resolveHeaderTemplate,\n resolveQueryTemplate,\n} from '../../../../services/core/t-form-tower-controller/functions/builders/header-template';\nimport { collectMinInputDepIds } from '../../../../services/core/t-form-tower-controller/functions/builders/missing-dependency-hint';\nimport {\n collectTemplateInputIds,\n resolvePayloadTemplate,\n} from '../../../../services/core/t-form-tower-controller/functions/builders/payload-template';\nimport { deriveDefaultPayloadTemplate } from '../../../../services/core/t-form-builder/functions/deriveDefaultPayloadTemplate';\nimport { returnMappedData } from '../../../../services/core/t-form-controller/function/postApiDataFetching';\n\n/**\n * Pure derivations shared by the inline endpoint summary\n * (`ApiEndpointConfigComponent`) and the full-screen editor dialog\n * (`ApiEndpointConfigDialogComponent`), so the two surfaces can never disagree\n * about what a fetch configuration contains or waits for.\n */\n\n/** One entry in the readiness rail. */\nexport interface ReadinessItem {\n readonly label: string;\n readonly state: 'done' | 'pending' | 'skip';\n}\n\n/** HTTP method understood by the method-colour map; falls back to neutral. */\ntype HttpMethod = APIDataFetchingConfigurationInterface['httpMethod'];\n\n/** CSS-variable colour per HTTP method (dark-mode-safe; never a hex literal). */\nexport const METHOD_COLOR: Readonly<Record<HttpMethod, string>> = {\n GET: 'var(--lib-forms-method-get)',\n POST: 'var(--lib-forms-method-post)',\n PUT: 'var(--lib-forms-method-put)',\n DELETE: 'var(--lib-forms-method-delete)',\n};\n\n/** Token colour for a config's HTTP method badge; `currentColor` when unknown. */\nexport function methodColorOf(cfg: APIDataFetchingConfigurationInterface | undefined): string {\n const method = cfg?.httpMethod;\n return method && method in METHOD_COLOR ? METHOD_COLOR[method] : 'currentColor';\n}\n\n/** POST and PUT carry a body; GET (and anything else) has no body panel. */\nexport function sendsBody(cfg: APIDataFetchingConfigurationInterface | undefined): boolean {\n const method = cfg?.httpMethod?.toUpperCase();\n return method === 'POST' || method === 'PUT';\n}\n\n/** Active body mechanism — unset means mapped inputs (runtime parity). */\nexport function bodyModeOf(cfg: APIDataFetchingConfigurationInterface | undefined): RequestBodyMode {\n return cfg?.backEndConfig?.requestBodyMode === 'template' ? 'template' : 'mappedInputs';\n}\n\n/** The configured minimum-input mapping, `[]` when none. */\nexport function minInputsOf(\n cfg: APIDataFetchingConfigurationInterface | undefined,\n): MinimumInputRequiredInterface[] {\n return cfg?.backEndConfig?.minimumInputRequired ?? [];\n}\n\n/** True once a response mapping has been authored. */\nexport function hasMappingOf(cfg: APIDataFetchingConfigurationInterface | undefined): boolean {\n const rules = cfg?.valueAccessRules;\n return Array.isArray(rules) ? rules.length > 0 : Boolean(rules);\n}\n\n/**\n * Number of query parameters the request carries — the authored template when\n * one exists, otherwise the endpoint's captured params (what the editor opens\n * on). Display-only; the runtime sends the authored template.\n */\nexport function paramCountOf(cfg: APIDataFetchingConfigurationInterface | undefined): number {\n return Object.keys(cfg?.queryTemplate ?? cfg?.capturedQuery ?? {}).length;\n}\n\n/** Number of request headers — same authored-else-captured read as params. */\nexport function headerCountOf(cfg: APIDataFetchingConfigurationInterface | undefined): number {\n return Object.keys(cfg?.headerTemplate ?? cfg?.capturedHeaders ?? {}).length;\n}\n\n/** Editor default for template mode, derived from the captured body/mapping. */\nexport function payloadDefaultOf(\n cfg: APIDataFetchingConfigurationInterface | undefined,\n): PayloadTemplate {\n return deriveDefaultPayloadTemplate(cfg?.backEndConfig) as PayloadTemplate;\n}\n\n/** The readiness rail, in configuration order. */\nexport function readinessOf(\n cfg: APIDataFetchingConfigurationInterface | undefined,\n kind: 'value' | 'options',\n): readonly ReadinessItem[] {\n const items: ReadinessItem[] = [\n { label: 'Endpoint', state: cfg?.httpEndPoint ? 'done' : 'pending' },\n ];\n if (sendsBody(cfg)) {\n const bodyDone =\n bodyModeOf(cfg) === 'template'\n ? Boolean(cfg?.backEndConfig?.payloadTemplate)\n : minInputsOf(cfg).length > 0;\n items.push({ label: 'Body', state: bodyDone ? 'done' : 'pending' });\n }\n items.push({\n label: kind === 'options' ? 'Options mapping' : 'Response mapping',\n state: hasMappingOf(cfg) ? 'done' : 'skip',\n });\n return items;\n}\n\n/**\n * Labels of the live fields this fetch waits for at fill time — the union of\n * header tokens, query tokens, and the active body mechanism's dependencies,\n * collected with the SAME pure helpers the runtime gates with.\n */\nexport function waitsForLabels(\n cfg: APIDataFetchingConfigurationInterface | undefined,\n formInputs: readonly FormColumnInputs[],\n): readonly string[] {\n if (!cfg) return [];\n const ids = new Set<string>([\n ...collectHeaderTemplateInputIds(cfg.headerTemplate),\n ...collectQueryTemplateInputIds(cfg.queryTemplate),\n ]);\n if (sendsBody(cfg)) {\n if (bodyModeOf(cfg) === 'template') {\n for (const tokenId of collectTemplateInputIds(cfg.backEndConfig?.payloadTemplate)) {\n ids.add(tokenId);\n }\n } else {\n for (const minInput of minInputsOf(cfg)) {\n for (const depId of collectMinInputDepIds(minInput)) ids.add(depId);\n }\n }\n }\n return [...ids].map((depId) => labelOf(formInputs, depId));\n}\n\n/**\n * A builder-side test request derived from the configuration alone — what the\n * dialog's \"Run API call\" sends to refresh the sample response.\n *\n * Built with the SAME pure resolvers the runtime request-gating uses, with one\n * deliberate difference: at build time there are no live form values, so\n * instead of idling on an unmet `{{inputId}}` token the request is sent with\n * that value empty/omitted and the token's id reported in `unresolved` — the\n * admin wants the fresh response SHAPE, and the UI names what was missing.\n *\n * The URL is passed **verbatim** (env `{{$KEY}}` tokens included), exactly as\n * the runtime passes it: the host-provided HTTP functions own URL resolution.\n */\nexport interface ConfiguredTestRequest {\n readonly method: HttpMethod;\n readonly url: string;\n /** The merged HttpClient options bag (persisted + resolved header/query templates). */\n readonly options: APIDataFetchingConfigurationInterface['httpHeaderOptions'];\n /** The request body for body-bearing methods; `undefined` for GET. */\n readonly body: Record<string, unknown> | undefined;\n /** inputIds bound to live fields that could not resolve at build time. */\n readonly unresolved: readonly string[];\n}\n\n/**\n * Derives the {@link ConfiguredTestRequest} for a fetch config, or `undefined`\n * while no endpoint is configured (there is nothing to run).\n *\n * @param cfg - The fetch-slot configuration.\n * @returns The runnable request, or `undefined` without an endpoint.\n */\nexport function deriveConfiguredRequest(\n cfg: APIDataFetchingConfigurationInterface | undefined,\n): ConfiguredTestRequest | undefined {\n if (!cfg?.httpEndPoint) return undefined;\n\n const noLiveValues = (): undefined => undefined;\n const headers = resolveHeaderTemplate(cfg.headerTemplate, noLiveValues);\n const query = resolveQueryTemplate(cfg.queryTemplate, noLiveValues);\n const unresolved = new Set<string>([...headers.missing, ...query.missing]);\n\n let body: Record<string, unknown> | undefined;\n if (sendsBody(cfg)) {\n if (bodyModeOf(cfg) === 'template' && cfg.backEndConfig?.payloadTemplate) {\n const resolved = resolvePayloadTemplate(cfg.backEndConfig.payloadTemplate, noLiveValues);\n for (const id of resolved.missing) unresolved.add(id);\n body = resolved.payload as Record<string, unknown>;\n } else {\n const minInputs = minInputsOf(cfg);\n // Defaults resolve; mapped entries have no live value yet — send the\n // body anyway (shape over completeness) and name what was missing.\n try {\n body = returnMappedData({}, minInputs, cfg.httpEndPoint) as Record<string, unknown>;\n } catch {\n body = { data: undefined };\n }\n for (const minInput of minInputs) {\n for (const depId of collectMinInputDepIds(minInput)) unresolved.add(depId);\n }\n }\n }\n\n return {\n method: (cfg.httpMethod?.toUpperCase() as HttpMethod) ?? 'GET',\n url: cfg.httpEndPoint,\n options: mergeQueryOptions(\n mergeHeaderOptions(cfg.httpHeaderOptions, headers.headers),\n query.params,\n ),\n body,\n unresolved: [...unresolved],\n };\n}\n\n/** Friendly labels for a set of dependency ids (date-range halves included). */\nexport function dependencyLabels(\n formInputs: readonly FormColumnInputs[],\n ids: readonly string[],\n): readonly string[] {\n return ids.map((depId) => labelOf(formInputs, depId));\n}\n\n/**\n * Renders an endpoint's Postman description (markdown) to safe HTML for the\n * dialog's Docs tab.\n *\n * Every character is HTML-escaped FIRST; the only tags in the output are the\n * ones this renderer emits, all of which survive Angular's `[innerHTML]`\n * sanitizer — so the binding needs no security bypass. The subset covers what\n * Postman authors actually write: headings, paragraphs, hard line breaks,\n * bold, italics, inline and fenced code, bullet/numbered lists, blockquotes,\n * and http(s) links. Anything else stays visible as plain text rather than\n * being swallowed.\n *\n * @param markdown - The captured Postman description, verbatim.\n * @returns An HTML string safe to bind via `[innerHTML]`.\n */\nexport function docsHtmlOf(markdown: string): string {\n // Fenced blocks first, on the ESCAPED text (backticks survive escaping) —\n // their contents must not be re-interpreted as markdown.\n return escapeHtml(markdown)\n .split('```')\n .map((segment, index) => {\n if (index % 2 === 1) {\n // Odd segments are fenced code; drop a leading language tag line.\n const code = segment.replace(/^[a-zA-Z0-9+#-]*\\r?\\n/, '').replace(/\\s+$/, '');\n return `<pre><code>${code}</code></pre>`;\n }\n return renderDocBlocks(segment);\n })\n .join('');\n}\n\n/** Escapes the five HTML-significant characters; runs before any tag is emitted. */\nfunction escapeHtml(text: string): string {\n return text\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\n\n/** Block-level pass: headings, lists, blockquotes, rules, paragraphs. */\nfunction renderDocBlocks(text: string): string {\n const out: string[] = [];\n let paragraph: string[] = [];\n let listTag: 'ul' | 'ol' | undefined;\n let listItems: string[] = [];\n let quoteLines: string[] = [];\n\n const flushParagraph = (): void => {\n // Single newlines are hard breaks — Postman authors line up key: value\n // rows and expect them to stay on their own lines.\n if (paragraph.length > 0) out.push(`<p>${paragraph.map(renderDocInline).join('<br />')}</p>`);\n paragraph = [];\n };\n const flushList = (): void => {\n if (listTag) {\n const items = listItems.map((item) => `<li>${renderDocInline(item)}</li>`).join('');\n out.push(`<${listTag}>${items}</${listTag}>`);\n }\n listTag = undefined;\n listItems = [];\n };\n const flushQuote = (): void => {\n if (quoteLines.length > 0) {\n out.push(`<blockquote>${quoteLines.map(renderDocInline).join('<br />')}</blockquote>`);\n }\n quoteLines = [];\n };\n const flushAll = (): void => {\n flushParagraph();\n flushList();\n flushQuote();\n };\n\n for (const raw of text.split(/\\r?\\n/)) {\n const line = raw.trimEnd();\n if (line.trim() === '') {\n flushAll();\n continue;\n }\n const heading = /^(#{1,6})\\s+(.*)$/.exec(line);\n if (heading) {\n flushAll();\n // The dialog owns h1/h2 — doc headings start at h3 so hierarchy holds.\n const level = Math.min((heading[1]?.length ?? 1) + 2, 6);\n out.push(`<h${level}>${renderDocInline(heading[2] ?? '')}</h${level}>`);\n continue;\n }\n if (/^\\s*([-*_])(\\s*\\1){2,}\\s*$/.test(line)) {\n flushAll();\n out.push('<hr />');\n continue;\n }\n const bullet = /^\\s*[-*+]\\s+(.*)$/.exec(line);\n if (bullet) {\n flushParagraph();\n flushQuote();\n if (listTag !== 'ul') flushList();\n listTag = 'ul';\n listItems.push(bullet[1] ?? '');\n continue;\n }\n const numbered = /^\\s*\\d+[.)]\\s+(.*)$/.exec(line);\n if (numbered) {\n flushParagraph();\n flushQuote();\n if (listTag !== 'ol') flushList();\n listTag = 'ol';\n listItems.push(numbered[1] ?? '');\n continue;\n }\n const quoted = /^\\s*>\\s?(.*)$/.exec(line);\n if (quoted) {\n flushParagraph();\n flushList();\n quoteLines.push(quoted[1] ?? '');\n continue;\n }\n flushList();\n flushQuote();\n paragraph.push(line);\n }\n flushAll();\n return out.join('');\n}\n\n/**\n * Inline pass: code spans, links, bold, italics. Code spans are cut out first\n * so their contents are never re-styled. `_underscore_` italics are left\n * alone on purpose — snake_case identifiers are common in these docs.\n */\nfunction renderDocInline(text: string): string {\n return text\n .split(/(`[^`]+`)/)\n .map((part) => {\n const code = /^`([^`]+)`$/.exec(part);\n if (code) return `<code>${code[1]}</code>`;\n return (\n part\n // Images collapse to their alt text — remote fetches stay out of the dialog.\n .replace(/!\\[([^\\]]*)\\]\\(([^()\\s]+)\\)/g, '$1')\n .replace(\n /\\[([^\\]]+)\\]\\((https?:\\/\\/[^()\\s]+)\\)/g,\n '<a href=\"$2\" target=\"_blank\" rel=\"noopener noreferrer\">$1</a>',\n )\n .replace(/\\*\\*([^*]+)\\*\\*/g, '<strong>$1</strong>')\n .replace(/__([^_]+)__/g, '<strong>$1</strong>')\n .replace(/\\*([^*]+)\\*/g, '<em>$1</em>')\n );\n })\n .join('');\n}\n\n/** Resolves a dependency id to a friendly label (date-range halves included). */\nfunction labelOf(inputs: readonly FormColumnInputs[], depId: string): string {\n const direct = inputs.find((candidate) => candidate.id === depId);\n if (direct?.label) return direct.label;\n // A date-range dependency is the HALF id `${columnId}.${key}` while the\n // builder's input list carries the raw column — name it via the column.\n const dot = depId.indexOf('.');\n if (dot > 0) {\n const column = inputs.find((candidate) => candidate.id === depId.slice(0, dot));\n if (column?.label) return `${column.label} (${depId.slice(dot + 1)})`;\n }\n return depId;\n}\n","import type { IFolderItem, IGetPostmanCollections } from 'ngx-t-forms-types';\r\n\r\n/** True when an item's own name or description contains the (already-lowercased) search text. */\r\nfunction itemMatches(item: IFolderItem, searchText: string): boolean {\r\n return (\r\n (item.name?.toLowerCase().includes(searchText) ?? false) ||\r\n (item.description?.toLowerCase().includes(searchText) ?? false)\r\n );\r\n}\r\n\r\n/**\r\n * Recursively prunes a folder tree to the items relevant to `searchText`.\r\n *\r\n * An item is kept when it matches directly (its whole subtree is then\r\n * preserved) OR when one of its descendants matches — in which case the\r\n * ancestor folder is preserved but its children are pruned to only the\r\n * matching branches. This fixes the legacy defect where ancestor folders of a\r\n * deep match were dropped (or whole sibling subtrees were retained).\r\n */\r\nfunction pruneItems(items: IFolderItem[] | undefined, searchText: string): IFolderItem[] {\r\n if (!items) {\r\n return [];\r\n }\r\n return items.reduce<IFolderItem[]>((kept, item) => {\r\n if (itemMatches(item, searchText)) {\r\n // Direct hit: keep the item and its full subtree intact.\r\n kept.push(item);\r\n return kept;\r\n }\r\n const matchingChildren = pruneItems(item.item, searchText);\r\n if (matchingChildren.length > 0) {\r\n // Ancestor of a match: keep the folder but only the matching branches.\r\n kept.push({ ...item, item: matchingChildren });\r\n }\r\n return kept;\r\n }, []);\r\n}\r\n\r\n/**\r\n * Filters a fetched Postman collection by a free-text search key, preserving\r\n * the ancestor folders of every match. An empty/whitespace key returns the\r\n * full set of top-level items unchanged.\r\n */\r\nexport function filterCollectionItems(\r\n collections: IGetPostmanCollections,\r\n searchKey: string,\r\n): IFolderItem[] {\r\n const items = collections.collection.item;\r\n const searchText = searchKey.trim().toLowerCase();\r\n if (!searchText) {\r\n return items;\r\n }\r\n return pruneItems(items, searchText);\r\n}\r\n","/**\r\n * Maps an HTTP method to its design-token CSS colour value.\r\n *\r\n * Returns a `var(--lib-forms-method-*)` reference (dark-mode safe, no hex /\r\n * named colours) so the tree can colour-code endpoints. Unknown methods fall\r\n * back to `currentColor`. Matching is case-insensitive.\r\n */\r\nexport function methodColor(method: string): string {\r\n switch (method.toUpperCase()) {\r\n case 'GET':\r\n return 'var(--lib-forms-method-get)';\r\n case 'POST':\r\n return 'var(--lib-forms-method-post)';\r\n case 'PUT':\r\n return 'var(--lib-forms-method-put)';\r\n case 'PATCH':\r\n return 'var(--lib-forms-method-patch)';\r\n case 'DELETE':\r\n return 'var(--lib-forms-method-delete)';\r\n default:\r\n return 'currentColor';\r\n }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ViewEncapsulation,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { HttpErrorResponse } from '@angular/common/http';\r\nimport { catchError, take, tap, throwError } from 'rxjs';\r\n\r\nimport { MatTreeModule } from '@angular/material/tree';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport type {\r\n FlatNode,\r\n IFolderItem,\r\n IGetPostmanCollections,\r\n IPostmanCollectionConfig,\r\n TreeNode,\r\n} from 'ngx-t-forms-types';\r\n\r\nimport { TreeComponent } from '../api-value-access-rules/functions/convertDataToTree';\r\nimport { convertPostmanFolderItemsToTree } from './functions/convertPostmanCollectionToTree';\r\nimport { filterCollectionItems } from './functions/filterCollectionItems';\r\nimport { methodColor } from './functions/methodColors';\r\nimport { SearchFieldComponent } from '../_shared/search-field/search-field.component';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\nimport { PostmanCollectionLoaderService } from '../_shared/postman-collection-loader.service';\r\nimport { _isEqual } from '../../../../shared/functions/isEqual';\r\n\r\n/**\r\n * Internal Postman-collection picker used by `rest-api-call-setup`.\r\n *\r\n * Fetches a Postman collection over HTTP and renders it as a searchable tree of\r\n * endpoints, emitting the selected folder item to the parent. Embedded\r\n * component — owns only its tree content; the parent renders any field\r\n * label / hint / errors.\r\n */\r\n@Component({\r\n selector: 'lib-postman-collections',\r\n templateUrl: './postman-collections.component.html',\r\n styleUrls: ['./postman-collections.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: { 'class': 'lib-postman-collections' },\r\n imports: [\r\n MatTreeModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatProgressSpinnerModule,\r\n MatTooltipModule,\r\n SearchFieldComponent,\r\n EmptyStateComponent,\r\n ],\r\n})\r\nexport class PostmanCollectionsComponent {\r\n /** Postman API config (collection URL + key). When invalid the component shows an error. */\r\n readonly postmanCollectionConfig = input<IPostmanCollectionConfig | undefined>(undefined);\r\n\r\n /** Endpoint IDs currently in a loading state (rendered with a spinner in the tree). */\r\n readonly loadingEndPoints = input<string[]>([]);\r\n\r\n /** Emits when the user picks an endpoint node from the tree. */\r\n readonly nodeSelectionChanged = output<IFolderItem>();\r\n\r\n readonly #collectionLoader = inject(PostmanCollectionLoaderService);\r\n readonly #destroyRef = inject(DestroyRef);\r\n\r\n /** Imperative mat-tree backing store reused from the access-rules tree. */\r\n protected readonly treeComponent = new TreeComponent();\r\n\r\n /** Raw fetched collection; `undefined` until the request resolves. */\r\n readonly #collection = signal<IGetPostmanCollections | undefined>(undefined);\r\n\r\n /** Current search text, two-way bound to the search field. */\r\n protected readonly searchKey = signal<string>('');\r\n\r\n /** Request-in-flight flag. */\r\n protected readonly loading = signal<boolean>(false);\r\n\r\n /** Last error (invalid config or HTTP failure); `undefined` when healthy. */\r\n protected readonly error = signal<HttpErrorResponse | undefined>(undefined);\r\n\r\n /** Folder items after applying the current search, ancestor-folders preserved. */\r\n protected readonly filteredItems = computed<IFolderItem[]>(() => {\r\n const collection = this.#collection();\r\n if (!collection) {\r\n return [];\r\n }\r\n return filterCollectionItems(collection, this.searchKey());\r\n });\r\n\r\n /** Tree nodes derived from {@link filteredItems}. */\r\n readonly #treeData = computed<TreeNode[]>(() =>\r\n convertPostmanFolderItemsToTree(this.filteredItems()),\r\n );\r\n\r\n /** True once a collection is loaded but the current search yields nothing. */\r\n protected readonly isEmpty = computed<boolean>(\r\n () => Boolean(this.#collection()) && this.#treeData().length === 0,\r\n );\r\n\r\n /** Cache for {@link getNodeLines} so identical levels reuse one array. */\r\n readonly #nodeLinesCache = new Map<number, readonly number[]>();\r\n\r\n /** Push derived tree data into the imperative mat-tree data source. */\r\n protected readonly syncTree = effect(() => {\r\n this.treeComponent.assignDataSourceData(this.#treeData());\r\n });\r\n\r\n /** Last config the effect acted on; guards against re-fetching when an unstable parent binding hands us a new-but-equal reference. */\r\n #loadedConfig: IPostmanCollectionConfig | undefined;\r\n #hasLoadedOnce = false;\r\n\r\n /** Fetch (or re-fetch) the collection only when the config input's content actually changes. */\r\n protected readonly loadOnConfigChange = effect(() => {\r\n const config = this.postmanCollectionConfig();\r\n if (this.#hasLoadedOnce && _isEqual(this.#loadedConfig, config)) {\r\n return;\r\n }\r\n this.#hasLoadedOnce = true;\r\n this.#loadedConfig = config;\r\n this.#loadCollection(config);\r\n });\r\n\r\n #isValidConfig(config: IPostmanCollectionConfig | undefined): config is IPostmanCollectionConfig {\r\n return Boolean(config?.collectionUrl) && Boolean(config?.collectionKey);\r\n }\r\n\r\n #loadCollection(config: IPostmanCollectionConfig | undefined): void {\r\n if (!this.#isValidConfig(config)) {\r\n this.#collection.set(undefined);\r\n this.loading.set(false);\r\n this.error.set(new HttpErrorResponse({ error: 'Invalid Postman Collection Config' }));\r\n return;\r\n }\r\n\r\n this.loading.set(true);\r\n this.#collectionLoader\r\n .getCollection(config)\r\n .pipe(\r\n take(1),\r\n tap(data => {\r\n this.#collection.set(data);\r\n this.error.set(undefined);\r\n this.loading.set(false);\r\n }),\r\n catchError((err: HttpErrorResponse) => {\r\n this.loading.set(false);\r\n this.error.set(err);\r\n return throwError(() => err);\r\n }),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe();\r\n }\r\n\r\n protected selectNode(node: IFolderItem): void {\r\n this.nodeSelectionChanged.emit(node);\r\n }\r\n\r\n protected methodColor(method: string): string {\r\n return methodColor(method);\r\n }\r\n\r\n /**\r\n * `true` when an endpoint cannot be configured onto an input: no URL, a\r\n * body-bearing method (POST/PUT) captured without a body to map, or DELETE —\r\n * which the runtime has no transport for (owner decision 2026-08-18: PUT is\r\n * supported and rides the POST family; DELETE stays blocked here until a\r\n * real need arrives).\r\n */\r\n protected isUnselectable(request: {\r\n method?: string;\r\n url?: { raw?: string };\r\n body?: { raw?: string };\r\n }): boolean {\r\n if (!request.url?.raw) return true;\r\n if (request.method === 'DELETE') return true;\r\n return !request.body?.raw && (request.method === 'POST' || request.method === 'PUT');\r\n }\r\n\r\n /** Why the endpoint is (un)selectable — shown as the row tooltip. */\r\n protected selectionTooltip(request: {\r\n method?: string;\r\n url?: { raw?: string };\r\n body?: { raw?: string };\r\n }): string {\r\n if (!request.url?.raw) return 'Invalid Postman config, missing Endpoint URL';\r\n if (request.method === 'DELETE') return 'DELETE endpoints are not supported';\r\n if (!request.body?.raw && (request.method === 'POST' || request.method === 'PUT')) {\r\n return `This ${request.method} endpoint has no request body to map`;\r\n }\r\n return request.url.raw;\r\n }\r\n\r\n protected isEndpointLoading(id: string): boolean {\r\n return this.loadingEndPoints().includes(id);\r\n }\r\n\r\n protected hasChild = (_: number, node: FlatNode): boolean =>\r\n this.treeComponent.hasChild(_, node);\r\n\r\n /** Memoised 1..level vertical guide-line indices for tree indentation. */\r\n protected getNodeLines(level: number): readonly number[] {\r\n const cached = this.#nodeLinesCache.get(level);\r\n if (cached) {\r\n return cached;\r\n }\r\n const lines = Array.from({ length: level }, (_, i) => i + 1);\r\n this.#nodeLinesCache.set(level, lines);\r\n return lines;\r\n }\r\n}\r\n","@if (loading()) {\r\n <div class=\"loading-container\">\r\n <mat-spinner diameter=\"36\"></mat-spinner>\r\n </div>\r\n} @else {\r\n <lib-search-field\r\n class=\"search\"\r\n placeholder=\"Search api\"\r\n [(value)]=\"searchKey\" />\r\n\r\n @if (error(); as err) {\r\n <lib-empty-state icon=\"error_outline\" [message]=\"err.message\" />\r\n } @else if (isEmpty()) {\r\n <lib-empty-state\r\n icon=\"search_off\"\r\n [message]=\"searchKey() ? 'No endpoints match your search' : 'No endpoints in this collection'\" />\r\n } @else {\r\n <mat-tree\r\n [dataSource]=\"treeComponent.dataSource\"\r\n [treeControl]=\"treeComponent.treeControl\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\r\n @if (isEndpointLoading(node.value.id)) {\r\n <mat-spinner diameter=\"22\" class=\"loading-spinner\"></mat-spinner>\r\n }\r\n @for (line of getNodeLines(node.level); track line) {\r\n <div class=\"line\" [style.left.px]=\"line * 40 + 8\"></div>\r\n }\r\n @if (node.value?.request; as request) {\r\n <button\r\n mat-button\r\n class=\"item\"\r\n [disabled]=\"isUnselectable(request)\"\r\n [matTooltip]=\"selectionTooltip(request)\"\r\n (click)=\"selectNode(node.value)\">\r\n <span class=\"node-key method\" [style.color]=\"methodColor(request.method)\">\r\n {{ request.method }}\r\n </span>\r\n <span>{{ node.key }}</span>\r\n </button>\r\n }\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\r\n <button\r\n mat-icon-button\r\n matTreeNodeToggle\r\n class=\"toggle\"\r\n [attr.aria-label]=\"'Toggle ' + node.key\">\r\n <mat-icon>\r\n {{ treeComponent.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\r\n </mat-icon>\r\n </button>\r\n <mat-icon class=\"folder-icon\">\r\n {{ treeComponent.treeControl.isExpanded(node) ? 'folder_open' : 'folder' }}\r\n </mat-icon>\r\n <span class=\"folder-label\">{{ node.key }}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n computed,\r\n effect,\r\n input,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport type { Observable } from 'rxjs';\r\n\r\nimport {\r\n APIDataFetchingConfigurationInterface,\r\n IFolderItem,\r\n IPostmanCollectionConfig,\r\n} from 'ngx-t-forms-types';\r\n\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { _isEqual } from '../../../../shared/functions/isEqual';\r\nimport { postmanItemToFetchConfig } from '../../../../shared/functions/postman/postman-item-to-fetch-config';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\nimport { ErrorListComponent } from '../_shared/error-list/error-list.component';\r\nimport { METHOD_COLOR } from '../api-endpoint-config/api-endpoint-config.logic';\r\nimport { PostmanCollectionsComponent } from '../postman-collections/postman-collections.component';\r\n\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nlet nextId = 0;\r\n\r\n/** Discrete UI mode this editor is in, derived from its inputs and value. */\r\ntype SetupMode = 'no-collection' | 'picker' | 'selected';\r\n\r\n/**\r\n * Lets the user pick an API endpoint from a Postman collection and exposes the\r\n * resulting {@link APIDataFetchingConfigurationInterface}. Renders one of three\r\n * states — no collection configured, the endpoint picker, or the selected\r\n * endpoint card — and embeds {@link PostmanCollectionsComponent} for the tree.\r\n *\r\n * Internal editor consumed by `t-dynamic-data-edit` and `data-source-picker`;\r\n * the parent owns the field label, hint and validation chrome.\r\n *\r\n * @example\r\n * <lib-rest-api-call-setup\r\n * [postmanCollectionConfig]=\"config()\"\r\n * [value]=\"value()\"\r\n * [disabled]=\"disabled()\"\r\n * (valueChanged)=\"onApiConfig($event)\" />\r\n */\r\n@Component({\r\n selector: 'lib-rest-api-call-setup',\r\n templateUrl: './rest-api-call-setup.component.html',\r\n styleUrl: './rest-api-call-setup.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [\r\n PostmanCollectionsComponent,\r\n EmptyStateComponent,\r\n ErrorListComponent,\r\n MatButtonModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n ],\r\n host: {\r\n 'class': 'lib-rest-api-call-setup',\r\n '[id]': 'hostId()',\r\n '[attr.data-mode]': 'mode()',\r\n },\r\n})\r\nexport class RestApiCallSetupComponent {\r\n readonly #fallbackId = `lib-rest-api-call-setup-${nextId++}`;\r\n\r\n /** Optional consumer-provided host id. */\r\n readonly id = input<string | undefined>(undefined);\r\n\r\n /** Postman collection that backs the picker. */\r\n readonly postmanCollectionConfig = input<IPostmanCollectionConfig | undefined>(undefined);\r\n\r\n /**\r\n * Optional HTTP GET function for fetching sample responses. Retained on the\r\n * contract for parity; this editor does not invoke it (selection is resolved\r\n * from the Postman collection the parent already loads).\r\n */\r\n readonly httpGetDataFunction = input<\r\n ((url: string, options: Record<string, unknown>) => Observable<unknown>) | undefined\r\n >(undefined);\r\n\r\n /** Disables the picker and shows a lock affordance. */\r\n readonly disabled = input<boolean>(false);\r\n\r\n /** Current configuration value. */\r\n readonly value = input<APIDataFetchingConfigurationInterface | undefined>(undefined);\r\n\r\n /** Validation errors surfaced from the parent editor. */\r\n readonly errors = input<IConfigElementError[] | undefined>([]);\r\n\r\n /** Emits whenever the user selects a new endpoint or clears the value. */\r\n readonly valueChanged = output<APIDataFetchingConfigurationInterface | undefined>();\r\n\r\n /** Endpoint IDs currently loading sample data (forwarded to the picker). */\r\n protected readonly loadingEndPoints = signal<string[]>([]);\r\n\r\n /** Local snapshot of the value, bridged from the `value` input. */\r\n readonly #localValue = signal<APIDataFetchingConfigurationInterface | undefined>(undefined);\r\n\r\n /** Read-only view of the active configuration for the template. */\r\n protected readonly currentValue = this.#localValue.asReadonly();\r\n\r\n /** Host id: consumer-provided or a stable per-instance fallback. */\r\n protected readonly hostId = computed<string>(() => this.id() ?? this.#fallbackId);\r\n\r\n /** True once the snapshot carries a usable endpoint + method. */\r\n protected readonly hasValidValue = computed<boolean>(() => {\r\n const v = this.#localValue();\r\n return Boolean(v?.httpEndPoint) && Boolean(v?.httpMethod);\r\n });\r\n\r\n /** Discrete UI mode driving the template's `@switch`. */\r\n protected readonly mode = computed<SetupMode>(() => {\r\n if (!this.postmanCollectionConfig()) return 'no-collection';\r\n return this.hasValidValue() ? 'selected' : 'picker';\r\n });\r\n\r\n /** Token-based colour for the selected endpoint's HTTP method badge. */\r\n protected readonly methodColor = computed<string>(() => {\r\n const method = this.#localValue()?.httpMethod;\r\n return method && method in METHOD_COLOR ? METHOD_COLOR[method] : 'currentColor';\r\n });\r\n\r\n /**\r\n * Bridge the `value` input into the local mutable snapshot, de-duping with a\r\n * deep structural compare (replaces the legacy `JSON.stringify` equality so\r\n * key order and `undefined` no longer cause spurious resets).\r\n */\r\n protected readonly valueBridge = effect(() => {\r\n const next = this.value();\r\n if (!_isEqual(next, this.#localValue())) {\r\n this.#localValue.set(next);\r\n }\r\n });\r\n\r\n /**\r\n * Maps the selected tree node into the API config and emits it.\r\n *\r\n * Gated on `request` alone. It used to also require `node.response` — a saved\r\n * Postman *example response* — even though nothing here reads it. An endpoint\r\n * without one could not be selected at all: the click was a silent no-op, the\r\n * config was never rebuilt, `requestBody` was never captured, and template mode\r\n * went on showing whatever skeleton was already persisted. A folder node (the\r\n * only other thing the picker can emit) has no `request`, so that check alone\r\n * is the correct guard.\r\n */\r\n protected nodeSelectionChanged(node: IFolderItem): void {\r\n const config = postmanItemToFetchConfig(node);\r\n if (!config) return;\r\n\r\n this.#localValue.set(config);\r\n this.valueChanged.emit(config);\r\n }\r\n\r\n /**\r\n * Clears the selection and emits a single `undefined` (the legacy double-emit\r\n * — `undefined` then a stub `{ source }` — was removed; see FLAG).\r\n */\r\n protected clearValue(): void {\r\n this.#localValue.set(undefined);\r\n this.valueChanged.emit(undefined);\r\n }\r\n\r\n}\r\n","@switch (mode()) {\r\n @case ('no-collection') {\r\n <lib-empty-state\r\n icon=\"link_off\"\r\n message=\"No Postman collection configured. Add a collection id and API key to pick an endpoint.\" />\r\n }\r\n\r\n @case ('selected') {\r\n <div class=\"lib-rest-api-call-setup__card\">\r\n <button\r\n type=\"button\"\r\n class=\"lib-rest-api-call-setup__endpoint\"\r\n mat-button\r\n [disabled]=\"disabled()\"\r\n [matTooltip]=\"currentValue()?.httpEndPoint ?? ''\"\r\n (click)=\"clearValue()\">\r\n <span class=\"lib-rest-api-call-setup__method\" [style.color]=\"methodColor()\">\r\n {{ currentValue()?.httpMethod }}\r\n </span>\r\n <span class=\"lib-rest-api-call-setup__name\">\r\n {{ currentValue()?.name }}\r\n </span>\r\n <mat-icon class=\"lib-rest-api-call-setup__clear\" aria-hidden=\"true\">close</mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n @case ('picker') {\r\n <lib-postman-collections\r\n class=\"lib-rest-api-call-setup__picker\"\r\n [class.lib-rest-api-call-setup__picker--disabled]=\"disabled()\"\r\n [postmanCollectionConfig]=\"postmanCollectionConfig()!\"\r\n [loadingEndPoints]=\"loadingEndPoints()\"\r\n (nodeSelectionChanged)=\"nodeSelectionChanged($event)\" />\r\n }\r\n}\r\n\r\n@if (disabled()) {\r\n <p class=\"lib-rest-api-call-setup__lock\">\r\n <mat-icon aria-hidden=\"true\">lock</mat-icon>\r\n <span>This endpoint is locked and cannot be changed.</span>\r\n </p>\r\n}\r\n\r\n<lib-error-list [errors]=\"errors()\" />\r\n"],"names":["i2","i3","i1"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;AAgBG;AAWH;;;;;;;;;AASG;AACH,SAAS,YAAY,CAAC,GAAuB,EAAA;IAC3C,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE;AAAE,QAAA,OAAO,EAAE;AAC3D,IAAA,IAAI;QACF,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;AACvC,QAAA,OAAO,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,GAAI,MAAkC,GAAG,EAAE;IACjG;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,EAAE;IACX;AACF;AAEA;AACA,SAAS,cAAc,CAAC,IAA6B,EAAA;IACnD,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC;AACrC;AAEA;;;;;;;;;;;;;AAaG;AACH,SAAS,iBAAiB,CAAC,OAAgB,EAAA;AACzC,IAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;AAAE,QAAA,OAAO,EAAE;IAEtC,MAAM,QAAQ,GAA2B,EAAE;AAC3C,IAAA,KAAK,MAAM,KAAK,IAAI,OAAwE,EAAE;AAC5F,QAAA,IAAI,KAAK,EAAE,QAAQ,KAAK,IAAI;YAAE;QAC9B,MAAM,GAAG,GAAG,OAAO,KAAK,EAAE,GAAG,KAAK,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE;QAClE,IAAI,GAAG,KAAK,EAAE;YAAE;QAChB,QAAQ,CAAC,GAAG,CAAC,GAAG,OAAO,KAAK,CA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AAA,oBAAA,EAAA,qBAAA,EAAA,qBAAA,EAAA,yBAAA,EAAA,YAAA,EAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAQP,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBApBrC,SAAS;+BACE,yBAAyB,EAAA,eAAA,EAGlB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,OAAA,EAChC;wBACP,2BAA2B;wBAC3B,mBAAmB;wBACnB,kBAAkB;wBAClB,eAAe;wBACf,aAAa;wBACb,gBAAgB;qBACjB,EAAA,IAAA,EACK;AACJ,wBAAA,OAAO,EAAE,yBAAyB;AAClC,wBAAA,MAAM,EAAE,UAAU;AAClB,wBAAA,kBAAkB,EAAE,QAAQ;AAC7B,qBAAA,EAAA,QAAA,EAAA,olDAAA,EAAA,MAAA,EAAA,CAAA,imCAAA,CAAA,EAAA;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-rest-api-call-setup.component-CLYe2Lf_.mjs","sources":["../../../projects/ngx-t-forms/src/lib/shared/functions/postman/postman-item-to-fetch-config.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/api-endpoint-config/api-endpoint-config.logic.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/postman-collections/functions/filterCollectionItems.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/postman-collections/functions/methodColors.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/postman-collections/postman-collections.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/postman-collections/postman-collections.component.html","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/rest-api-call-setup/rest-api-call-setup.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/rest-api-call-setup/rest-api-call-setup.component.html"],"sourcesContent":["/**\n * @file Maps a Postman collection item to a stored\n * `APIDataFetchingConfigurationInterface`.\n *\n * Extracted from `rest-api-call-setup.component.ts`, where it was the whole of\n * `nodeSelectionChanged` plus six module-local helpers and two private methods.\n * Nothing outside that component could produce the configuration a human\n * produces by picking an endpoint, which made every other caller either\n * duplicate the mapping — guaranteed to drift from the editor — or hand-author\n * configs. The AI form-builder's endpoint catalog is the caller that forced the\n * issue: it needs complete stored configurations, and the library already\n * fetches the collection they would come from.\n *\n * Pure by construction: no Angular, no injection, no I/O, no component state.\n * The component keeps ownership of what to DO with the result (set its local\n * value, emit it); this module only decides what the result is.\n */\nimport {\n DataSources,\n JsDataTypes,\n type APIDataFetchingConfigurationInterface,\n type HeaderTemplate,\n type IFolderItem,\n type MinimumInputRequiredInterface,\n type QueryTemplate,\n} from 'ngx-t-forms-types';\n\n/**\n * Parses a Postman raw request body into a plain object.\n *\n * Returns `{}` for an absent, blank or non-JSON body (a `graphql` / `formdata`\n * mode, or raw text with comments). Nesting and key names are preserved exactly\n * as authored — this is the document template mode seeds from.\n *\n * @param raw - `request.body.raw` from the Postman collection.\n * @returns The parsed body, or `{}` when there is nothing usable.\n */\nfunction parseRawBody(raw: string | undefined): Record<string, unknown> {\n if (typeof raw !== 'string' || raw.trim() === '') return {};\n try {\n const parsed: unknown = JSON.parse(raw);\n return parsed !== null && typeof parsed === 'object' ? (parsed as Record<string, unknown>) : {};\n } catch {\n return {};\n }\n}\n\n/** True when a parsed body carries at least one key — i.e. it is worth persisting. */\nfunction isNonEmptyBody(body: Record<string, unknown>): boolean {\n return Object.keys(body).length > 0;\n}\n\n/**\n * Collects the enabled entries of a Postman `[{ key, value, disabled? }]` list.\n *\n * A `disabled` entry is one the author deliberately switched off in the\n * collection, so it is skipped rather than carried into the form config —\n * mirroring what Postman itself would send.\n *\n * Headers and URL query params have the identical shape and the identical rule,\n * so they share one implementation here; they were two copies of the same loop\n * in the component.\n *\n * @param entries - `request.header` or `request.url.query`.\n * @returns The captured `name → value` map (empty when there is nothing usable).\n */\nfunction parseKeyValueList(entries: unknown): Record<string, string> {\n if (!Array.isArray(entries)) return {};\n\n const captured: Record<string, string> = {};\n for (const entry of entries as Array<{ key?: unknown; value?: unknown; disabled?: unknown }>) {\n if (entry?.disabled === true) continue;\n const key = typeof entry?.key === 'string' ? entry.key.trim() : '';\n if (key === '') continue;\n captured[key] = typeof entry.value === 'string' ? entry.value : String(entry?.value ?? '');\n }\n return captured;\n}\n\n/**\n * Strips the query string from a captured endpoint URL — but ONLY when the\n * query was captured structurally (so nothing is lost): once the params live in\n * `capturedQuery`/`queryTemplate`, leaving them in the URL as text would send\n * every param twice. A URL whose `?…` had no structured `url.query` entries is\n * left verbatim — the text is then the only record of it.\n *\n * @param raw - `request.url.raw` from the Postman collection.\n * @param capturedQuery - What {@link parseKeyValueList} extracted from the query.\n * @returns The URL to persist as `httpEndPoint`.\n */\nfunction stripCapturedQueryString(raw: string, capturedQuery: QueryTemplate): string {\n if (Object.keys(capturedQuery).length === 0) return raw;\n const cut = raw.indexOf('?');\n return cut === -1 ? raw : raw.slice(0, cut);\n}\n\n/** Maps a JS `typeof` string to the shared {@link JsDataTypes} enum member. */\nfunction toJsDataType(value: unknown): JsDataTypes {\n switch (typeof value) {\n case 'string':\n return JsDataTypes.String;\n case 'number':\n return JsDataTypes.Number;\n case 'bigint':\n return JsDataTypes.BigInt;\n case 'boolean':\n return JsDataTypes.Boolean;\n case 'symbol':\n return JsDataTypes.Symbol;\n case 'function':\n return JsDataTypes.Function;\n case 'object':\n return JsDataTypes.Object;\n default:\n return JsDataTypes.Undefined;\n }\n}\n\n/** One `minimumInputRequired` entry. */\nfunction toRequiredInput(\n name: string,\n value: unknown,\n primaryKey: boolean,\n): MinimumInputRequiredInterface {\n return { name, type: toJsDataType(value), primaryKey };\n}\n\n/**\n * Derives the body-bearing endpoint's required inputs from its request body.\n * Top-level keys are primary; entries under `data` are secondary (non-primary).\n *\n * **Deliberately flat.** `MinimumInputRequiredInterface` has a `name`, not a\n * path, so a nested value can only ever become one `JsDataTypes.Object` entry —\n * mapping `filter.archive` is not expressible here. That is what template mode\n * is for, and why the untouched `requestBody` is captured alongside this: it is\n * the only faithful record of a nested payload.\n */\nfunction extractRequiredInputs(\n requestBody: Record<string, unknown>,\n): MinimumInputRequiredInterface[] {\n const { data, ...rest } = requestBody;\n const dataEntries: Record<string, unknown> = data && typeof data === 'object' ? { ...data } : {};\n\n const primaryKeys = Object.entries(rest).map(([key, val]) => toRequiredInput(key, val, true));\n const secondaryKeys = Object.entries(dataEntries).map(([key, val]) =>\n toRequiredInput(key, val, false),\n );\n\n return [...primaryKeys, ...secondaryKeys];\n}\n\n/**\n * @public\n *\n * Builds the stored fetch configuration for one Postman collection item.\n *\n * @param node - A node from the collection tree. A FOLDER node — the only other\n * thing the picker can emit — has no `request`, so that check alone is the\n * correct guard, and it is why this returns `undefined` rather than a partial\n * configuration: a half-built config persisted as if it were real is the\n * failure this whole mapping exists to avoid.\n * @returns The configuration to persist, or `undefined` when the node carries\n * no request.\n *\n * @example\n * const config = postmanItemToFetchConfig(node);\n * if (config) this.valueChanged.emit(config);\n */\nexport function postmanItemToFetchConfig(\n node: IFolderItem,\n): APIDataFetchingConfigurationInterface | undefined {\n const { id, name, request } = node;\n\n if (!request) return undefined;\n\n const requestBody = parseRawBody(request.body?.raw);\n const capturedHeaders: HeaderTemplate = parseKeyValueList(request.header);\n const capturedQuery: QueryTemplate = parseKeyValueList(request.url.query);\n\n // PUT is body-bearing exactly like POST (it rides the POST branch family at\n // runtime), so it seeds the same required-input mapping.\n const sendsBody = request.method === 'POST' || request.method === 'PUT';\n const minimumInputRequired: MinimumInputRequiredInterface[] = sendsBody\n ? extractRequiredInputs(requestBody)\n : [];\n\n return {\n _id: id,\n name,\n // Structurally-captured query params are stripped from the URL text so a\n // param never rides twice (once as literal text, once via queryTemplate).\n httpEndPoint: stripCapturedQueryString(request.url.raw, capturedQuery),\n httpMethod: request.method,\n source: DataSources.Api,\n postFormData: sendsBody,\n // The endpoint's own headers, kept so the header-template editor opens on\n // what the API declares. Omitted when it declared none, so the editor falls\n // back to its skeleton rather than persisting an empty map.\n ...(Object.keys(capturedHeaders).length > 0 ? { capturedHeaders } : {}),\n // Same contract for the URL's own query params → the query-template editor.\n ...(Object.keys(capturedQuery).length > 0 ? { capturedQuery } : {}),\n // The endpoint's Postman documentation, verbatim → the Docs tab.\n ...(request.description?.trim() ? { capturedDocs: request.description } : {}),\n backEndConfig: {\n minimumInputRequired,\n // The endpoint's untouched body is the ONLY faithful record of a nested\n // payload (`minimumInputRequired` entries carry a `name`, not a path), so\n // it is what seeds template mode. Captured for every method that actually\n // sends one — keyed on the body being present, not on `method === 'POST'`,\n // because PUT/PATCH bodies are equally real. Omitted entirely when there\n // is nothing to store, so `deriveDefaultPayloadTemplate` falls back cleanly.\n ...(isNonEmptyBody(requestBody)\n ? {\n requestBody: requestBody as APIDataFetchingConfigurationInterface['backEndConfig']['requestBody'],\n }\n : {}),\n },\n };\n}\n","import type {\n APIDataFetchingConfigurationInterface,\n FormColumnInputs,\n MinimumInputRequiredInterface,\n PayloadTemplate,\n RequestBodyMode,\n} from 'ngx-t-forms-types';\n\nimport {\n collectHeaderTemplateInputIds,\n collectQueryTemplateInputIds,\n mergeHeaderOptions,\n mergeQueryOptions,\n resolveHeaderTemplate,\n resolveQueryTemplate,\n} from '../../../../services/core/t-form-tower-controller/functions/builders/header-template';\nimport { collectMinInputDepIds } from '../../../../services/core/t-form-tower-controller/functions/builders/missing-dependency-hint';\nimport {\n collectTemplateInputIds,\n resolvePayloadTemplate,\n} from '../../../../services/core/t-form-tower-controller/functions/builders/payload-template';\nimport { deriveDefaultPayloadTemplate } from '../../../../services/core/t-form-builder/functions/deriveDefaultPayloadTemplate';\nimport { returnMappedData } from '../../../../services/core/t-form-controller/function/postApiDataFetching';\n\n/**\n * Pure derivations shared by the inline endpoint summary\n * (`ApiEndpointConfigComponent`) and the full-screen editor dialog\n * (`ApiEndpointConfigDialogComponent`), so the two surfaces can never disagree\n * about what a fetch configuration contains or waits for.\n */\n\n/** One entry in the readiness rail. */\nexport interface ReadinessItem {\n readonly label: string;\n readonly state: 'done' | 'pending' | 'skip';\n}\n\n/** HTTP method understood by the method-colour map; falls back to neutral. */\ntype HttpMethod = APIDataFetchingConfigurationInterface['httpMethod'];\n\n/** CSS-variable colour per HTTP method (dark-mode-safe; never a hex literal). */\nexport const METHOD_COLOR: Readonly<Record<HttpMethod, string>> = {\n GET: 'var(--lib-forms-method-get)',\n POST: 'var(--lib-forms-method-post)',\n PUT: 'var(--lib-forms-method-put)',\n DELETE: 'var(--lib-forms-method-delete)',\n};\n\n/** Token colour for a config's HTTP method badge; `currentColor` when unknown. */\nexport function methodColorOf(cfg: APIDataFetchingConfigurationInterface | undefined): string {\n const method = cfg?.httpMethod;\n return method && method in METHOD_COLOR ? METHOD_COLOR[method] : 'currentColor';\n}\n\n/** POST and PUT carry a body; GET (and anything else) has no body panel. */\nexport function sendsBody(cfg: APIDataFetchingConfigurationInterface | undefined): boolean {\n const method = cfg?.httpMethod?.toUpperCase();\n return method === 'POST' || method === 'PUT';\n}\n\n/** Active body mechanism — unset means mapped inputs (runtime parity). */\nexport function bodyModeOf(cfg: APIDataFetchingConfigurationInterface | undefined): RequestBodyMode {\n return cfg?.backEndConfig?.requestBodyMode === 'template' ? 'template' : 'mappedInputs';\n}\n\n/** The configured minimum-input mapping, `[]` when none. */\nexport function minInputsOf(\n cfg: APIDataFetchingConfigurationInterface | undefined,\n): MinimumInputRequiredInterface[] {\n return cfg?.backEndConfig?.minimumInputRequired ?? [];\n}\n\n/** True once a response mapping has been authored. */\nexport function hasMappingOf(cfg: APIDataFetchingConfigurationInterface | undefined): boolean {\n const rules = cfg?.valueAccessRules;\n return Array.isArray(rules) ? rules.length > 0 : Boolean(rules);\n}\n\n/**\n * Number of query parameters the request carries — the authored template when\n * one exists, otherwise the endpoint's captured params (what the editor opens\n * on). Display-only; the runtime sends the authored template.\n */\nexport function paramCountOf(cfg: APIDataFetchingConfigurationInterface | undefined): number {\n return Object.keys(cfg?.queryTemplate ?? cfg?.capturedQuery ?? {}).length;\n}\n\n/** Number of request headers — same authored-else-captured read as params. */\nexport function headerCountOf(cfg: APIDataFetchingConfigurationInterface | undefined): number {\n return Object.keys(cfg?.headerTemplate ?? cfg?.capturedHeaders ?? {}).length;\n}\n\n/** Editor default for template mode, derived from the captured body/mapping. */\nexport function payloadDefaultOf(\n cfg: APIDataFetchingConfigurationInterface | undefined,\n): PayloadTemplate {\n return deriveDefaultPayloadTemplate(cfg?.backEndConfig) as PayloadTemplate;\n}\n\n/** The readiness rail, in configuration order. */\nexport function readinessOf(\n cfg: APIDataFetchingConfigurationInterface | undefined,\n kind: 'value' | 'options',\n): readonly ReadinessItem[] {\n const items: ReadinessItem[] = [\n { label: 'Endpoint', state: cfg?.httpEndPoint ? 'done' : 'pending' },\n ];\n if (sendsBody(cfg)) {\n const bodyDone =\n bodyModeOf(cfg) === 'template'\n ? Boolean(cfg?.backEndConfig?.payloadTemplate)\n : minInputsOf(cfg).length > 0;\n items.push({ label: 'Body', state: bodyDone ? 'done' : 'pending' });\n }\n items.push({\n label: kind === 'options' ? 'Options mapping' : 'Response mapping',\n state: hasMappingOf(cfg) ? 'done' : 'skip',\n });\n return items;\n}\n\n/**\n * Labels of the live fields this fetch waits for at fill time — the union of\n * header tokens, query tokens, and the active body mechanism's dependencies,\n * collected with the SAME pure helpers the runtime gates with.\n */\nexport function waitsForLabels(\n cfg: APIDataFetchingConfigurationInterface | undefined,\n formInputs: readonly FormColumnInputs[],\n): readonly string[] {\n if (!cfg) return [];\n const ids = new Set<string>([\n ...collectHeaderTemplateInputIds(cfg.headerTemplate),\n ...collectQueryTemplateInputIds(cfg.queryTemplate),\n ]);\n if (sendsBody(cfg)) {\n if (bodyModeOf(cfg) === 'template') {\n for (const tokenId of collectTemplateInputIds(cfg.backEndConfig?.payloadTemplate)) {\n ids.add(tokenId);\n }\n } else {\n for (const minInput of minInputsOf(cfg)) {\n for (const depId of collectMinInputDepIds(minInput)) ids.add(depId);\n }\n }\n }\n return [...ids].map((depId) => labelOf(formInputs, depId));\n}\n\n/**\n * A builder-side test request derived from the configuration alone — what the\n * dialog's \"Run API call\" sends to refresh the sample response.\n *\n * Built with the SAME pure resolvers the runtime request-gating uses, with one\n * deliberate difference: at build time there are no live form values, so\n * instead of idling on an unmet `{{inputId}}` token the request is sent with\n * that value empty/omitted and the token's id reported in `unresolved` — the\n * admin wants the fresh response SHAPE, and the UI names what was missing.\n *\n * The URL is passed **verbatim** (env `{{$KEY}}` tokens included), exactly as\n * the runtime passes it: the host-provided HTTP functions own URL resolution.\n */\nexport interface ConfiguredTestRequest {\n readonly method: HttpMethod;\n readonly url: string;\n /** The merged HttpClient options bag (persisted + resolved header/query templates). */\n readonly options: APIDataFetchingConfigurationInterface['httpHeaderOptions'];\n /** The request body for body-bearing methods; `undefined` for GET. */\n readonly body: Record<string, unknown> | undefined;\n /** inputIds bound to live fields that could not resolve at build time. */\n readonly unresolved: readonly string[];\n}\n\n/**\n * Derives the {@link ConfiguredTestRequest} for a fetch config, or `undefined`\n * while no endpoint is configured (there is nothing to run).\n *\n * @param cfg - The fetch-slot configuration.\n * @returns The runnable request, or `undefined` without an endpoint.\n */\nexport function deriveConfiguredRequest(\n cfg: APIDataFetchingConfigurationInterface | undefined,\n): ConfiguredTestRequest | undefined {\n if (!cfg?.httpEndPoint) return undefined;\n\n const noLiveValues = (): undefined => undefined;\n const headers = resolveHeaderTemplate(cfg.headerTemplate, noLiveValues);\n const query = resolveQueryTemplate(cfg.queryTemplate, noLiveValues);\n const unresolved = new Set<string>([...headers.missing, ...query.missing]);\n\n let body: Record<string, unknown> | undefined;\n if (sendsBody(cfg)) {\n if (bodyModeOf(cfg) === 'template' && cfg.backEndConfig?.payloadTemplate) {\n const resolved = resolvePayloadTemplate(cfg.backEndConfig.payloadTemplate, noLiveValues);\n for (const id of resolved.missing) unresolved.add(id);\n body = resolved.payload as Record<string, unknown>;\n } else {\n const minInputs = minInputsOf(cfg);\n // Defaults resolve; mapped entries have no live value yet — send the\n // body anyway (shape over completeness) and name what was missing.\n try {\n body = returnMappedData({}, minInputs, cfg.httpEndPoint) as Record<string, unknown>;\n } catch {\n body = { data: undefined };\n }\n for (const minInput of minInputs) {\n for (const depId of collectMinInputDepIds(minInput)) unresolved.add(depId);\n }\n }\n }\n\n return {\n method: (cfg.httpMethod?.toUpperCase() as HttpMethod) ?? 'GET',\n url: cfg.httpEndPoint,\n options: mergeQueryOptions(\n mergeHeaderOptions(cfg.httpHeaderOptions, headers.headers),\n query.params,\n ),\n body,\n unresolved: [...unresolved],\n };\n}\n\n/** Friendly labels for a set of dependency ids (date-range halves included). */\nexport function dependencyLabels(\n formInputs: readonly FormColumnInputs[],\n ids: readonly string[],\n): readonly string[] {\n return ids.map((depId) => labelOf(formInputs, depId));\n}\n\n/**\n * Renders an endpoint's Postman description (markdown) to safe HTML for the\n * dialog's Docs tab.\n *\n * Every character is HTML-escaped FIRST; the only tags in the output are the\n * ones this renderer emits, all of which survive Angular's `[innerHTML]`\n * sanitizer — so the binding needs no security bypass. The subset covers what\n * Postman authors actually write: headings, paragraphs, hard line breaks,\n * bold, italics, inline and fenced code, bullet/numbered lists, blockquotes,\n * and http(s) links. Anything else stays visible as plain text rather than\n * being swallowed.\n *\n * @param markdown - The captured Postman description, verbatim.\n * @returns An HTML string safe to bind via `[innerHTML]`.\n */\nexport function docsHtmlOf(markdown: string): string {\n // Fenced blocks first, on the ESCAPED text (backticks survive escaping) —\n // their contents must not be re-interpreted as markdown.\n return escapeHtml(markdown)\n .split('```')\n .map((segment, index) => {\n if (index % 2 === 1) {\n // Odd segments are fenced code; drop a leading language tag line.\n const code = segment.replace(/^[a-zA-Z0-9+#-]*\\r?\\n/, '').replace(/\\s+$/, '');\n return `<pre><code>${code}</code></pre>`;\n }\n return renderDocBlocks(segment);\n })\n .join('');\n}\n\n/** Escapes the five HTML-significant characters; runs before any tag is emitted. */\nfunction escapeHtml(text: string): string {\n return text\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\n\n/** Block-level pass: headings, lists, blockquotes, rules, paragraphs. */\nfunction renderDocBlocks(text: string): string {\n const out: string[] = [];\n let paragraph: string[] = [];\n let listTag: 'ul' | 'ol' | undefined;\n let listItems: string[] = [];\n let quoteLines: string[] = [];\n\n const flushParagraph = (): void => {\n // Single newlines are hard breaks — Postman authors line up key: value\n // rows and expect them to stay on their own lines.\n if (paragraph.length > 0) out.push(`<p>${paragraph.map(renderDocInline).join('<br />')}</p>`);\n paragraph = [];\n };\n const flushList = (): void => {\n if (listTag) {\n const items = listItems.map((item) => `<li>${renderDocInline(item)}</li>`).join('');\n out.push(`<${listTag}>${items}</${listTag}>`);\n }\n listTag = undefined;\n listItems = [];\n };\n const flushQuote = (): void => {\n if (quoteLines.length > 0) {\n out.push(`<blockquote>${quoteLines.map(renderDocInline).join('<br />')}</blockquote>`);\n }\n quoteLines = [];\n };\n const flushAll = (): void => {\n flushParagraph();\n flushList();\n flushQuote();\n };\n\n for (const raw of text.split(/\\r?\\n/)) {\n const line = raw.trimEnd();\n if (line.trim() === '') {\n flushAll();\n continue;\n }\n const heading = /^(#{1,6})\\s+(.*)$/.exec(line);\n if (heading) {\n flushAll();\n // The dialog owns h1/h2 — doc headings start at h3 so hierarchy holds.\n const level = Math.min((heading[1]?.length ?? 1) + 2, 6);\n out.push(`<h${level}>${renderDocInline(heading[2] ?? '')}</h${level}>`);\n continue;\n }\n if (/^\\s*([-*_])(\\s*\\1){2,}\\s*$/.test(line)) {\n flushAll();\n out.push('<hr />');\n continue;\n }\n const bullet = /^\\s*[-*+]\\s+(.*)$/.exec(line);\n if (bullet) {\n flushParagraph();\n flushQuote();\n if (listTag !== 'ul') flushList();\n listTag = 'ul';\n listItems.push(bullet[1] ?? '');\n continue;\n }\n const numbered = /^\\s*\\d+[.)]\\s+(.*)$/.exec(line);\n if (numbered) {\n flushParagraph();\n flushQuote();\n if (listTag !== 'ol') flushList();\n listTag = 'ol';\n listItems.push(numbered[1] ?? '');\n continue;\n }\n const quoted = /^\\s*>\\s?(.*)$/.exec(line);\n if (quoted) {\n flushParagraph();\n flushList();\n quoteLines.push(quoted[1] ?? '');\n continue;\n }\n flushList();\n flushQuote();\n paragraph.push(line);\n }\n flushAll();\n return out.join('');\n}\n\n/**\n * Inline pass: code spans, links, bold, italics. Code spans are cut out first\n * so their contents are never re-styled. `_underscore_` italics are left\n * alone on purpose — snake_case identifiers are common in these docs.\n */\nfunction renderDocInline(text: string): string {\n return text\n .split(/(`[^`]+`)/)\n .map((part) => {\n const code = /^`([^`]+)`$/.exec(part);\n if (code) return `<code>${code[1]}</code>`;\n return (\n part\n // Images collapse to their alt text — remote fetches stay out of the dialog.\n .replace(/!\\[([^\\]]*)\\]\\(([^()\\s]+)\\)/g, '$1')\n .replace(\n /\\[([^\\]]+)\\]\\((https?:\\/\\/[^()\\s]+)\\)/g,\n '<a href=\"$2\" target=\"_blank\" rel=\"noopener noreferrer\">$1</a>',\n )\n .replace(/\\*\\*([^*]+)\\*\\*/g, '<strong>$1</strong>')\n .replace(/__([^_]+)__/g, '<strong>$1</strong>')\n .replace(/\\*([^*]+)\\*/g, '<em>$1</em>')\n );\n })\n .join('');\n}\n\n/** Resolves a dependency id to a friendly label (date-range halves included). */\nfunction labelOf(inputs: readonly FormColumnInputs[], depId: string): string {\n const direct = inputs.find((candidate) => candidate.id === depId);\n if (direct?.label) return direct.label;\n // A date-range dependency is the HALF id `${columnId}.${key}` while the\n // builder's input list carries the raw column — name it via the column.\n const dot = depId.indexOf('.');\n if (dot > 0) {\n const column = inputs.find((candidate) => candidate.id === depId.slice(0, dot));\n if (column?.label) return `${column.label} (${depId.slice(dot + 1)})`;\n }\n return depId;\n}\n","import type { IFolderItem, IGetPostmanCollections } from 'ngx-t-forms-types';\r\n\r\n/** True when an item's own name or description contains the (already-lowercased) search text. */\r\nfunction itemMatches(item: IFolderItem, searchText: string): boolean {\r\n return (\r\n (item.name?.toLowerCase().includes(searchText) ?? false) ||\r\n (item.description?.toLowerCase().includes(searchText) ?? false)\r\n );\r\n}\r\n\r\n/**\r\n * Recursively prunes a folder tree to the items relevant to `searchText`.\r\n *\r\n * An item is kept when it matches directly (its whole subtree is then\r\n * preserved) OR when one of its descendants matches — in which case the\r\n * ancestor folder is preserved but its children are pruned to only the\r\n * matching branches. This fixes the legacy defect where ancestor folders of a\r\n * deep match were dropped (or whole sibling subtrees were retained).\r\n */\r\nfunction pruneItems(items: IFolderItem[] | undefined, searchText: string): IFolderItem[] {\r\n if (!items) {\r\n return [];\r\n }\r\n return items.reduce<IFolderItem[]>((kept, item) => {\r\n if (itemMatches(item, searchText)) {\r\n // Direct hit: keep the item and its full subtree intact.\r\n kept.push(item);\r\n return kept;\r\n }\r\n const matchingChildren = pruneItems(item.item, searchText);\r\n if (matchingChildren.length > 0) {\r\n // Ancestor of a match: keep the folder but only the matching branches.\r\n kept.push({ ...item, item: matchingChildren });\r\n }\r\n return kept;\r\n }, []);\r\n}\r\n\r\n/**\r\n * Filters a fetched Postman collection by a free-text search key, preserving\r\n * the ancestor folders of every match. An empty/whitespace key returns the\r\n * full set of top-level items unchanged.\r\n */\r\nexport function filterCollectionItems(\r\n collections: IGetPostmanCollections,\r\n searchKey: string,\r\n): IFolderItem[] {\r\n const items = collections.collection.item;\r\n const searchText = searchKey.trim().toLowerCase();\r\n if (!searchText) {\r\n return items;\r\n }\r\n return pruneItems(items, searchText);\r\n}\r\n","/**\r\n * Maps an HTTP method to its design-token CSS colour value.\r\n *\r\n * Returns a `var(--lib-forms-method-*)` reference (dark-mode safe, no hex /\r\n * named colours) so the tree can colour-code endpoints. Unknown methods fall\r\n * back to `currentColor`. Matching is case-insensitive.\r\n */\r\nexport function methodColor(method: string): string {\r\n switch (method.toUpperCase()) {\r\n case 'GET':\r\n return 'var(--lib-forms-method-get)';\r\n case 'POST':\r\n return 'var(--lib-forms-method-post)';\r\n case 'PUT':\r\n return 'var(--lib-forms-method-put)';\r\n case 'PATCH':\r\n return 'var(--lib-forms-method-patch)';\r\n case 'DELETE':\r\n return 'var(--lib-forms-method-delete)';\r\n default:\r\n return 'currentColor';\r\n }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ViewEncapsulation,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { HttpErrorResponse } from '@angular/common/http';\r\nimport { catchError, take, tap, throwError } from 'rxjs';\r\n\r\nimport { MatTreeModule } from '@angular/material/tree';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport type {\r\n FlatNode,\r\n IFolderItem,\r\n IGetPostmanCollections,\r\n IPostmanCollectionConfig,\r\n TreeNode,\r\n} from 'ngx-t-forms-types';\r\n\r\nimport { TreeComponent } from '../api-value-access-rules/functions/convertDataToTree';\r\nimport { convertPostmanFolderItemsToTree } from './functions/convertPostmanCollectionToTree';\r\nimport { filterCollectionItems } from './functions/filterCollectionItems';\r\nimport { methodColor } from './functions/methodColors';\r\nimport { SearchFieldComponent } from '../_shared/search-field/search-field.component';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\nimport { PostmanCollectionLoaderService } from '../_shared/postman-collection-loader.service';\r\nimport { _isEqual } from '../../../../shared/functions/isEqual';\r\n\r\n/**\r\n * Internal Postman-collection picker used by `rest-api-call-setup`.\r\n *\r\n * Fetches a Postman collection over HTTP and renders it as a searchable tree of\r\n * endpoints, emitting the selected folder item to the parent. Embedded\r\n * component — owns only its tree content; the parent renders any field\r\n * label / hint / errors.\r\n */\r\n@Component({\r\n selector: 'lib-postman-collections',\r\n templateUrl: './postman-collections.component.html',\r\n styleUrls: ['./postman-collections.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: { 'class': 'lib-postman-collections' },\r\n imports: [\r\n MatTreeModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatProgressSpinnerModule,\r\n MatTooltipModule,\r\n SearchFieldComponent,\r\n EmptyStateComponent,\r\n ],\r\n})\r\nexport class PostmanCollectionsComponent {\r\n /** Postman API config (collection URL + key). When invalid the component shows an error. */\r\n readonly postmanCollectionConfig = input<IPostmanCollectionConfig | undefined>(undefined);\r\n\r\n /** Endpoint IDs currently in a loading state (rendered with a spinner in the tree). */\r\n readonly loadingEndPoints = input<string[]>([]);\r\n\r\n /** Emits when the user picks an endpoint node from the tree. */\r\n readonly nodeSelectionChanged = output<IFolderItem>();\r\n\r\n readonly #collectionLoader = inject(PostmanCollectionLoaderService);\r\n readonly #destroyRef = inject(DestroyRef);\r\n\r\n /** Imperative mat-tree backing store reused from the access-rules tree. */\r\n protected readonly treeComponent = new TreeComponent();\r\n\r\n /** Raw fetched collection; `undefined` until the request resolves. */\r\n readonly #collection = signal<IGetPostmanCollections | undefined>(undefined);\r\n\r\n /** Current search text, two-way bound to the search field. */\r\n protected readonly searchKey = signal<string>('');\r\n\r\n /** Request-in-flight flag. */\r\n protected readonly loading = signal<boolean>(false);\r\n\r\n /** Last error (invalid config or HTTP failure); `undefined` when healthy. */\r\n protected readonly error = signal<HttpErrorResponse | undefined>(undefined);\r\n\r\n /** Folder items after applying the current search, ancestor-folders preserved. */\r\n protected readonly filteredItems = computed<IFolderItem[]>(() => {\r\n const collection = this.#collection();\r\n if (!collection) {\r\n return [];\r\n }\r\n return filterCollectionItems(collection, this.searchKey());\r\n });\r\n\r\n /** Tree nodes derived from {@link filteredItems}. */\r\n readonly #treeData = computed<TreeNode[]>(() =>\r\n convertPostmanFolderItemsToTree(this.filteredItems()),\r\n );\r\n\r\n /** True once a collection is loaded but the current search yields nothing. */\r\n protected readonly isEmpty = computed<boolean>(\r\n () => Boolean(this.#collection()) && this.#treeData().length === 0,\r\n );\r\n\r\n /** Cache for {@link getNodeLines} so identical levels reuse one array. */\r\n readonly #nodeLinesCache = new Map<number, readonly number[]>();\r\n\r\n /** Push derived tree data into the imperative mat-tree data source. */\r\n protected readonly syncTree = effect(() => {\r\n this.treeComponent.assignDataSourceData(this.#treeData());\r\n });\r\n\r\n /** Last config the effect acted on; guards against re-fetching when an unstable parent binding hands us a new-but-equal reference. */\r\n #loadedConfig: IPostmanCollectionConfig | undefined;\r\n #hasLoadedOnce = false;\r\n\r\n /** Fetch (or re-fetch) the collection only when the config input's content actually changes. */\r\n protected readonly loadOnConfigChange = effect(() => {\r\n const config = this.postmanCollectionConfig();\r\n if (this.#hasLoadedOnce && _isEqual(this.#loadedConfig, config)) {\r\n return;\r\n }\r\n this.#hasLoadedOnce = true;\r\n this.#loadedConfig = config;\r\n this.#loadCollection(config);\r\n });\r\n\r\n #isValidConfig(config: IPostmanCollectionConfig | undefined): config is IPostmanCollectionConfig {\r\n return Boolean(config?.collectionUrl) && Boolean(config?.collectionKey);\r\n }\r\n\r\n #loadCollection(config: IPostmanCollectionConfig | undefined): void {\r\n if (!this.#isValidConfig(config)) {\r\n this.#collection.set(undefined);\r\n this.loading.set(false);\r\n this.error.set(new HttpErrorResponse({ error: 'Invalid Postman Collection Config' }));\r\n return;\r\n }\r\n\r\n this.loading.set(true);\r\n this.#collectionLoader\r\n .getCollection(config)\r\n .pipe(\r\n take(1),\r\n tap(data => {\r\n this.#collection.set(data);\r\n this.error.set(undefined);\r\n this.loading.set(false);\r\n }),\r\n catchError((err: HttpErrorResponse) => {\r\n this.loading.set(false);\r\n this.error.set(err);\r\n return throwError(() => err);\r\n }),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe();\r\n }\r\n\r\n protected selectNode(node: IFolderItem): void {\r\n this.nodeSelectionChanged.emit(node);\r\n }\r\n\r\n protected methodColor(method: string): string {\r\n return methodColor(method);\r\n }\r\n\r\n /**\r\n * `true` when an endpoint cannot be configured onto an input: no URL, a\r\n * body-bearing method (POST/PUT) captured without a body to map, or DELETE —\r\n * which the runtime has no transport for (owner decision 2026-08-18: PUT is\r\n * supported and rides the POST family; DELETE stays blocked here until a\r\n * real need arrives).\r\n */\r\n protected isUnselectable(request: {\r\n method?: string;\r\n url?: { raw?: string };\r\n body?: { raw?: string };\r\n }): boolean {\r\n if (!request.url?.raw) return true;\r\n if (request.method === 'DELETE') return true;\r\n return !request.body?.raw && (request.method === 'POST' || request.method === 'PUT');\r\n }\r\n\r\n /** Why the endpoint is (un)selectable — shown as the row tooltip. */\r\n protected selectionTooltip(request: {\r\n method?: string;\r\n url?: { raw?: string };\r\n body?: { raw?: string };\r\n }): string {\r\n if (!request.url?.raw) return 'Invalid Postman config, missing Endpoint URL';\r\n if (request.method === 'DELETE') return 'DELETE endpoints are not supported';\r\n if (!request.body?.raw && (request.method === 'POST' || request.method === 'PUT')) {\r\n return `This ${request.method} endpoint has no request body to map`;\r\n }\r\n return request.url.raw;\r\n }\r\n\r\n protected isEndpointLoading(id: string): boolean {\r\n return this.loadingEndPoints().includes(id);\r\n }\r\n\r\n protected hasChild = (_: number, node: FlatNode): boolean =>\r\n this.treeComponent.hasChild(_, node);\r\n\r\n /** Memoised 1..level vertical guide-line indices for tree indentation. */\r\n protected getNodeLines(level: number): readonly number[] {\r\n const cached = this.#nodeLinesCache.get(level);\r\n if (cached) {\r\n return cached;\r\n }\r\n const lines = Array.from({ length: level }, (_, i) => i + 1);\r\n this.#nodeLinesCache.set(level, lines);\r\n return lines;\r\n }\r\n}\r\n","@if (loading()) {\r\n <div class=\"loading-container\">\r\n <mat-spinner diameter=\"36\"></mat-spinner>\r\n </div>\r\n} @else {\r\n <lib-search-field\r\n class=\"search\"\r\n placeholder=\"Search api\"\r\n [(value)]=\"searchKey\" />\r\n\r\n @if (error(); as err) {\r\n <lib-empty-state icon=\"error_outline\" [message]=\"err.message\" />\r\n } @else if (isEmpty()) {\r\n <lib-empty-state\r\n icon=\"search_off\"\r\n [message]=\"searchKey() ? 'No endpoints match your search' : 'No endpoints in this collection'\" />\r\n } @else {\r\n <mat-tree\r\n [dataSource]=\"treeComponent.dataSource\"\r\n [treeControl]=\"treeComponent.treeControl\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\r\n @if (isEndpointLoading(node.value.id)) {\r\n <mat-spinner diameter=\"22\" class=\"loading-spinner\"></mat-spinner>\r\n }\r\n @for (line of getNodeLines(node.level); track line) {\r\n <div class=\"line\" [style.left.px]=\"line * 40 + 8\"></div>\r\n }\r\n @if (node.value?.request; as request) {\r\n <button\r\n mat-button\r\n class=\"item\"\r\n [disabled]=\"isUnselectable(request)\"\r\n [matTooltip]=\"selectionTooltip(request)\"\r\n (click)=\"selectNode(node.value)\">\r\n <span class=\"node-key method\" [style.color]=\"methodColor(request.method)\">\r\n {{ request.method }}\r\n </span>\r\n <span>{{ node.key }}</span>\r\n </button>\r\n }\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\r\n <button\r\n mat-icon-button\r\n matTreeNodeToggle\r\n class=\"toggle\"\r\n [attr.aria-label]=\"'Toggle ' + node.key\">\r\n <mat-icon>\r\n {{ treeComponent.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\r\n </mat-icon>\r\n </button>\r\n <mat-icon class=\"folder-icon\">\r\n {{ treeComponent.treeControl.isExpanded(node) ? 'folder_open' : 'folder' }}\r\n </mat-icon>\r\n <span class=\"folder-label\">{{ node.key }}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n computed,\r\n effect,\r\n input,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport type { Observable } from 'rxjs';\r\n\r\nimport {\r\n APIDataFetchingConfigurationInterface,\r\n IFolderItem,\r\n IPostmanCollectionConfig,\r\n} from 'ngx-t-forms-types';\r\n\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { _isEqual } from '../../../../shared/functions/isEqual';\r\nimport { postmanItemToFetchConfig } from '../../../../shared/functions/postman/postman-item-to-fetch-config';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\nimport { ErrorListComponent } from '../_shared/error-list/error-list.component';\r\nimport { METHOD_COLOR } from '../api-endpoint-config/api-endpoint-config.logic';\r\nimport { PostmanCollectionsComponent } from '../postman-collections/postman-collections.component';\r\n\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nlet nextId = 0;\r\n\r\n/** Discrete UI mode this editor is in, derived from its inputs and value. */\r\ntype SetupMode = 'no-collection' | 'picker' | 'selected';\r\n\r\n/**\r\n * Lets the user pick an API endpoint from a Postman collection and exposes the\r\n * resulting {@link APIDataFetchingConfigurationInterface}. Renders one of three\r\n * states — no collection configured, the endpoint picker, or the selected\r\n * endpoint card — and embeds {@link PostmanCollectionsComponent} for the tree.\r\n *\r\n * Internal editor consumed by `t-dynamic-data-edit` and `data-source-picker`;\r\n * the parent owns the field label, hint and validation chrome.\r\n *\r\n * @example\r\n * <lib-rest-api-call-setup\r\n * [postmanCollectionConfig]=\"config()\"\r\n * [value]=\"value()\"\r\n * [disabled]=\"disabled()\"\r\n * (valueChanged)=\"onApiConfig($event)\" />\r\n */\r\n@Component({\r\n selector: 'lib-rest-api-call-setup',\r\n templateUrl: './rest-api-call-setup.component.html',\r\n styleUrl: './rest-api-call-setup.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [\r\n PostmanCollectionsComponent,\r\n EmptyStateComponent,\r\n ErrorListComponent,\r\n MatButtonModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n ],\r\n host: {\r\n 'class': 'lib-rest-api-call-setup',\r\n '[id]': 'hostId()',\r\n '[attr.data-mode]': 'mode()',\r\n },\r\n})\r\nexport class RestApiCallSetupComponent {\r\n readonly #fallbackId = `lib-rest-api-call-setup-${nextId++}`;\r\n\r\n /** Optional consumer-provided host id. */\r\n readonly id = input<string | undefined>(undefined);\r\n\r\n /** Postman collection that backs the picker. */\r\n readonly postmanCollectionConfig = input<IPostmanCollectionConfig | undefined>(undefined);\r\n\r\n /**\r\n * Optional HTTP GET function for fetching sample responses. Retained on the\r\n * contract for parity; this editor does not invoke it (selection is resolved\r\n * from the Postman collection the parent already loads).\r\n */\r\n readonly httpGetDataFunction = input<\r\n ((url: string, options: Record<string, unknown>) => Observable<unknown>) | undefined\r\n >(undefined);\r\n\r\n /** Disables the picker and shows a lock affordance. */\r\n readonly disabled = input<boolean>(false);\r\n\r\n /** Current configuration value. */\r\n readonly value = input<APIDataFetchingConfigurationInterface | undefined>(undefined);\r\n\r\n /** Validation errors surfaced from the parent editor. */\r\n readonly errors = input<IConfigElementError[] | undefined>([]);\r\n\r\n /** Emits whenever the user selects a new endpoint or clears the value. */\r\n readonly valueChanged = output<APIDataFetchingConfigurationInterface | undefined>();\r\n\r\n /** Endpoint IDs currently loading sample data (forwarded to the picker). */\r\n protected readonly loadingEndPoints = signal<string[]>([]);\r\n\r\n /** Local snapshot of the value, bridged from the `value` input. */\r\n readonly #localValue = signal<APIDataFetchingConfigurationInterface | undefined>(undefined);\r\n\r\n /** Read-only view of the active configuration for the template. */\r\n protected readonly currentValue = this.#localValue.asReadonly();\r\n\r\n /** Host id: consumer-provided or a stable per-instance fallback. */\r\n protected readonly hostId = computed<string>(() => this.id() ?? this.#fallbackId);\r\n\r\n /** True once the snapshot carries a usable endpoint + method. */\r\n protected readonly hasValidValue = computed<boolean>(() => {\r\n const v = this.#localValue();\r\n return Boolean(v?.httpEndPoint) && Boolean(v?.httpMethod);\r\n });\r\n\r\n /** Discrete UI mode driving the template's `@switch`. */\r\n protected readonly mode = computed<SetupMode>(() => {\r\n if (!this.postmanCollectionConfig()) return 'no-collection';\r\n return this.hasValidValue() ? 'selected' : 'picker';\r\n });\r\n\r\n /** Token-based colour for the selected endpoint's HTTP method badge. */\r\n protected readonly methodColor = computed<string>(() => {\r\n const method = this.#localValue()?.httpMethod;\r\n return method && method in METHOD_COLOR ? METHOD_COLOR[method] : 'currentColor';\r\n });\r\n\r\n /**\r\n * Bridge the `value` input into the local mutable snapshot, de-duping with a\r\n * deep structural compare (replaces the legacy `JSON.stringify` equality so\r\n * key order and `undefined` no longer cause spurious resets).\r\n */\r\n protected readonly valueBridge = effect(() => {\r\n const next = this.value();\r\n if (!_isEqual(next, this.#localValue())) {\r\n this.#localValue.set(next);\r\n }\r\n });\r\n\r\n /**\r\n * Maps the selected tree node into the API config and emits it.\r\n *\r\n * Gated on `request` alone. It used to also require `node.response` — a saved\r\n * Postman *example response* — even though nothing here reads it. An endpoint\r\n * without one could not be selected at all: the click was a silent no-op, the\r\n * config was never rebuilt, `requestBody` was never captured, and template mode\r\n * went on showing whatever skeleton was already persisted. A folder node (the\r\n * only other thing the picker can emit) has no `request`, so that check alone\r\n * is the correct guard.\r\n */\r\n protected nodeSelectionChanged(node: IFolderItem): void {\r\n const config = postmanItemToFetchConfig(node);\r\n if (!config) return;\r\n\r\n this.#localValue.set(config);\r\n this.valueChanged.emit(config);\r\n }\r\n\r\n /**\r\n * Clears the selection and emits a single `undefined` (the legacy double-emit\r\n * — `undefined` then a stub `{ source }` — was removed; see FLAG).\r\n */\r\n protected clearValue(): void {\r\n this.#localValue.set(undefined);\r\n this.valueChanged.emit(undefined);\r\n }\r\n\r\n}\r\n","@switch (mode()) {\r\n @case ('no-collection') {\r\n <lib-empty-state\r\n icon=\"link_off\"\r\n message=\"No Postman collection configured. Add a collection id and API key to pick an endpoint.\" />\r\n }\r\n\r\n @case ('selected') {\r\n <div class=\"lib-rest-api-call-setup__card\">\r\n <button\r\n type=\"button\"\r\n class=\"lib-rest-api-call-setup__endpoint\"\r\n mat-button\r\n [disabled]=\"disabled()\"\r\n [matTooltip]=\"currentValue()?.httpEndPoint ?? ''\"\r\n (click)=\"clearValue()\">\r\n <span class=\"lib-rest-api-call-setup__method\" [style.color]=\"methodColor()\">\r\n {{ currentValue()?.httpMethod }}\r\n </span>\r\n <span class=\"lib-rest-api-call-setup__name\">\r\n {{ currentValue()?.name }}\r\n </span>\r\n <mat-icon class=\"lib-rest-api-call-setup__clear\" aria-hidden=\"true\">close</mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n @case ('picker') {\r\n <lib-postman-collections\r\n class=\"lib-rest-api-call-setup__picker\"\r\n [class.lib-rest-api-call-setup__picker--disabled]=\"disabled()\"\r\n [postmanCollectionConfig]=\"postmanCollectionConfig()!\"\r\n [loadingEndPoints]=\"loadingEndPoints()\"\r\n (nodeSelectionChanged)=\"nodeSelectionChanged($event)\" />\r\n }\r\n}\r\n\r\n@if (disabled()) {\r\n <p class=\"lib-rest-api-call-setup__lock\">\r\n <mat-icon aria-hidden=\"true\">lock</mat-icon>\r\n <span>This endpoint is locked and cannot be changed.</span>\r\n </p>\r\n}\r\n\r\n<lib-error-list [errors]=\"errors()\" />\r\n"],"names":["i2","i3","i1"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;AAgBG;AAWH;;;;;;;;;AASG;AACH,SAAS,YAAY,CAAC,GAAuB,EAAA;IAC3C,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE;AAAE,QAAA,OAAO,EAAE;AAC3D,IAAA,IAAI;QACF,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;AACvC,QAAA,OAAO,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,GAAI,MAAkC,GAAG,EAAE;IACjG;AAAE,I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BAAA,EAAA,QAAA,EAAA,olDAAA,EAAA,MAAA,EAAA,CAAA,imCAAA,CAAA,EAAA;;;;;;;;;;"}
|
|
@@ -10,7 +10,7 @@ import * as i5 from '@angular/material/table';
|
|
|
10
10
|
import { MatTableModule } from '@angular/material/table';
|
|
11
11
|
import * as i8 from '@angular/material/toolbar';
|
|
12
12
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
13
|
-
import { F as FormsStoreService } from './ngx-t-forms-ngx-t-forms-
|
|
13
|
+
import { F as FormsStoreService } from './ngx-t-forms-ngx-t-forms-Dt4iPwb-.mjs';
|
|
14
14
|
import { ElementTypes, validateFormSlide } from 'ngx-t-forms-types';
|
|
15
15
|
|
|
16
16
|
class SectionReportComponent {
|
|
@@ -95,4 +95,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
95
95
|
}], propDecorators: { sectionId: [{ type: i0.Input, args: [{ isSignal: true, alias: "sectionId", required: true }] }] } });
|
|
96
96
|
|
|
97
97
|
export { SectionReportComponent };
|
|
98
|
-
//# sourceMappingURL=ngx-t-forms-section-report.component-
|
|
98
|
+
//# sourceMappingURL=ngx-t-forms-section-report.component-foLHlD-I.mjs.map
|