ngx-t-forms 2.0.11 → 2.0.14

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.
Files changed (61) hide show
  1. package/fesm2022/{ngx-t-forms-api-value-access-rules.component-Cz4ruucP.mjs → ngx-t-forms-api-value-access-rules.component-CMKTgeD4.mjs} +11 -12
  2. package/fesm2022/{ngx-t-forms-api-value-access-rules.component-Cz4ruucP.mjs.map → ngx-t-forms-api-value-access-rules.component-CMKTgeD4.mjs.map} +1 -1
  3. package/fesm2022/{ngx-t-forms-calculated-field-rules.component-DdAzjsV9.mjs → ngx-t-forms-calculated-field-rules.component-FkPPTG1s.mjs} +8 -9
  4. package/fesm2022/{ngx-t-forms-calculated-field-rules.component-DdAzjsV9.mjs.map → ngx-t-forms-calculated-field-rules.component-FkPPTG1s.mjs.map} +1 -1
  5. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-CMScZq9C.mjs +189 -0
  6. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-CMScZq9C.mjs.map +1 -0
  7. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CZglpHAQ.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-CdJ-r4XS.mjs} +7 -8
  8. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CZglpHAQ.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-CdJ-r4XS.mjs.map} +1 -1
  9. package/fesm2022/{ngx-t-forms-form-input-selector.component-D8sg5JiD.mjs → ngx-t-forms-form-input-selector.component-Cmn8r7Ex.mjs} +7 -6
  10. package/fesm2022/{ngx-t-forms-form-input-selector.component-D8sg5JiD.mjs.map → ngx-t-forms-form-input-selector.component-Cmn8r7Ex.mjs.map} +1 -1
  11. package/fesm2022/{ngx-t-forms-form-json-view.component-CO7EYgoY.mjs → ngx-t-forms-form-json-view.component-C1brLmzI.mjs} +5 -5
  12. package/fesm2022/{ngx-t-forms-form-json-view.component-CO7EYgoY.mjs.map → ngx-t-forms-form-json-view.component-C1brLmzI.mjs.map} +1 -1
  13. package/fesm2022/{ngx-t-forms-form-section-stepper.component-DYfPkzOO.mjs → ngx-t-forms-form-section-stepper.component-CxuWKb7v.mjs} +5 -5
  14. package/fesm2022/{ngx-t-forms-form-section-stepper.component-DYfPkzOO.mjs.map → ngx-t-forms-form-section-stepper.component-CxuWKb7v.mjs.map} +1 -1
  15. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-Coppm548.mjs → ngx-t-forms-forms-builder-menu.component-5v76lDgO.mjs} +12 -12
  16. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-Coppm548.mjs.map → ngx-t-forms-forms-builder-menu.component-5v76lDgO.mjs.map} +1 -1
  17. package/fesm2022/{ngx-t-forms-input-editor.component-BuSjy9Xq.mjs → ngx-t-forms-input-editor.component-St6l9Hr-.mjs} +12 -12
  18. package/fesm2022/{ngx-t-forms-input-editor.component-BuSjy9Xq.mjs.map → ngx-t-forms-input-editor.component-St6l9Hr-.mjs.map} +1 -1
  19. package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C1uQVrVP.mjs → ngx-t-forms-mat-chip-list-editor.component-BrRevSpQ.mjs} +5 -5
  20. package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C1uQVrVP.mjs.map → ngx-t-forms-mat-chip-list-editor.component-BrRevSpQ.mjs.map} +1 -1
  21. package/fesm2022/{ngx-t-forms-mat-slider-editor.component-B0Qcx6y9.mjs → ngx-t-forms-mat-slider-editor.component-BcgU9NYj.mjs} +5 -5
  22. package/fesm2022/{ngx-t-forms-mat-slider-editor.component-B0Qcx6y9.mjs.map → ngx-t-forms-mat-slider-editor.component-BcgU9NYj.mjs.map} +1 -1
  23. package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-B3N3mb8E.mjs → ngx-t-forms-mat-slider-toggle-editor.component-C0bZ6L19.mjs} +7 -7
  24. package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-B3N3mb8E.mjs.map → ngx-t-forms-mat-slider-toggle-editor.component-C0bZ6L19.mjs.map} +1 -1
  25. package/fesm2022/{ngx-t-forms-missing-form-configs.component-me7NBrdO.mjs → ngx-t-forms-missing-form-configs.component-BBsEWu1_.mjs} +5 -5
  26. package/fesm2022/{ngx-t-forms-missing-form-configs.component-me7NBrdO.mjs.map → ngx-t-forms-missing-form-configs.component-BBsEWu1_.mjs.map} +1 -1
  27. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-Cx08Sysp.mjs +280 -0
  28. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-Cx08Sysp.mjs.map +1 -0
  29. package/fesm2022/{ngx-t-forms-ngx-t-forms-C6wZyKbR.mjs → ngx-t-forms-ngx-t-forms-DOtego0e.mjs} +393 -300
  30. package/fesm2022/ngx-t-forms-ngx-t-forms-DOtego0e.mjs.map +1 -0
  31. package/fesm2022/{ngx-t-forms-pipeline-generator.component-Bu94_5ji.mjs → ngx-t-forms-pipeline-generator.component-CuXpNDYZ.mjs} +21 -22
  32. package/fesm2022/{ngx-t-forms-pipeline-generator.component-Bu94_5ji.mjs.map → ngx-t-forms-pipeline-generator.component-CuXpNDYZ.mjs.map} +1 -1
  33. package/fesm2022/{ngx-t-forms-required-inputs.component-BdKBo1bW.mjs → ngx-t-forms-required-inputs.component-aoZjTIVr.mjs} +7 -8
  34. package/fesm2022/{ngx-t-forms-required-inputs.component-BdKBo1bW.mjs.map → ngx-t-forms-required-inputs.component-aoZjTIVr.mjs.map} +1 -1
  35. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-59CnCXEt.mjs → ngx-t-forms-rest-api-call-setup.component-HDQwuGiu.mjs} +8 -8
  36. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-59CnCXEt.mjs.map → ngx-t-forms-rest-api-call-setup.component-HDQwuGiu.mjs.map} +1 -1
  37. package/fesm2022/{ngx-t-forms-section-report.component-DB_5Jx3j.mjs → ngx-t-forms-section-report.component-C92mqFtY.mjs} +5 -5
  38. package/fesm2022/{ngx-t-forms-section-report.component-DB_5Jx3j.mjs.map → ngx-t-forms-section-report.component-C92mqFtY.mjs.map} +1 -1
  39. package/fesm2022/{ngx-t-forms-selection-options-editor.component-B4LtSVfp.mjs → ngx-t-forms-selection-options-editor.component--TlWm7_4.mjs} +6 -6
  40. package/fesm2022/{ngx-t-forms-selection-options-editor.component-B4LtSVfp.mjs.map → ngx-t-forms-selection-options-editor.component--TlWm7_4.mjs.map} +1 -1
  41. package/fesm2022/{ngx-t-forms-validators-config.component-CehxpsPR.mjs → ngx-t-forms-validators-config.component-hCT8BAtp.mjs} +10 -10
  42. package/fesm2022/{ngx-t-forms-validators-config.component-CehxpsPR.mjs.map → ngx-t-forms-validators-config.component-hCT8BAtp.mjs.map} +1 -1
  43. package/fesm2022/ngx-t-forms.mjs +1 -1
  44. package/lib/components/forms/forms.component.d.ts +1 -1
  45. package/lib/components/index.d.ts +1 -2
  46. package/lib/components/t-dynamic-data-edit/elements/chip-options-creator-editor/chip-options-creator-editor.component.d.ts +53 -0
  47. package/lib/components/t-dynamic-data-edit/elements/mscoa-segment-config/mscoa-segment-config.component.d.ts +7 -1
  48. package/lib/components/t-dynamic-data-edit/t-dynamic-data-edit.component.d.ts +1 -0
  49. package/lib/components/t-form-input/elements/mscoa-form-input/elements/account-value/account-value.component.d.ts +4 -8
  50. package/lib/components/t-form-input/elements/mscoa-form-input/elements/mscoa-chart/mscoa-chart.component.d.ts +21 -9
  51. package/lib/components/t-form-input/elements/mscoa-form-input/elements/scoa-account-table/scoa-account-table.component.d.ts +2 -0
  52. package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-actions.d.ts +2 -2
  53. package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-component-store.service.d.ts +13 -6
  54. package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-selectors.d.ts +11 -4
  55. package/lib/shared/pipes/date/days-ago.pipe.d.ts +5 -0
  56. package/package.json +13 -17
  57. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BY67rkzl.mjs +0 -258
  58. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BY67rkzl.mjs.map +0 -1
  59. package/fesm2022/ngx-t-forms-ngx-t-forms-C6wZyKbR.mjs.map +0 -1
  60. package/lib/components/t-form-input/elements/editor-input-element/core/form-input-rich-text-editor/form-input-rich-text-editor.component.d.ts +0 -14
  61. package/lib/components/t-form-input/elements/editor-input-element/core/form-input-rich-text-editor/sync-editor/sync-editor.component.d.ts +0 -10
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-t-forms-required-inputs.component-BdKBo1bW.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 { CommonModule } from '@angular/common';\r\nimport { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\n\r\n\r\nimport { FormsModule, NgControl } from '@angular/forms';\r\n\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { MinimumInputRequiredInterface, MinInputMapInput, MinInputTypes } from 'ngx-t-forms-types';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { getInputIllustration } from '../../../../shared/functions/getInputIllustration';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { Subject } from 'rxjs';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\ninterface MapToInputs extends FormColumnInputs {\r\n illustration: string\r\n activated: boolean\r\n}\r\n@Component({\r\n selector: 'app-required-inputs',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule, FormsModule],\r\n templateUrl: './required-inputs.component.html',\r\n styleUrl: './required-inputs.component.scss',\r\n providers: [{ provide: MatFormFieldControl, useExisting:RequiredInputsComponent }],\r\n})\r\nexport class RequiredInputsComponent implements MatFormFieldControl<MinimumInputRequiredInterface[]> {\r\n\r\n\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n\r\n @HostBinding() id = `app-required-inputs-${RequiredInputsComponent .nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\n disabled: boolean = false;\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\nget errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n\r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.app-required-inputs');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n }\r\n onContainerClick(event: MouseEvent): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n private _value: Array<MinimumInputRequiredInterface> = []\r\n @Input() set value(v: Array<MinimumInputRequiredInterface>) {\r\n const changed = JSON.stringify(this._value) !== JSON.stringify(v)\r\n if (changed) {\r\n this._value = v\r\n }\r\n\r\n }\r\n get value() {\r\n return this._value\r\n }\r\n @Input() formInputs: FormColumnInputs[] = []\r\n @Output() valueChanged = new EventEmitter<any>();\r\n public activeInput: string = '';\r\n\r\n\r\n minInputTypes = MinInputTypes\r\n\r\n minInputValueType(type: MinInputTypes) {\r\n\r\n if (type === \"mapDocFilter\" && !!this.minInputInEdit) {\r\n ((this.minInputInEdit as any).mapTo as MinInputMapInput[]) = []\r\n\r\n }\r\n if (this.minInputInEdit?.type === type) {\r\n this.minInputInEdit.type = undefined;\r\n } else if (this.minInputInEdit) {\r\n this.minInputInEdit.type = type\r\n }\r\n\r\n this.valueChanged.emit(this.value)\r\n\r\n }\r\n get minInputInEdit(): MinimumInputRequiredInterface {\r\n return this.value?.find((v) => v.name === this.activeInput) || {} as MinimumInputRequiredInterface;\r\n }\r\n set minInputInEdit(v: MinimumInputRequiredInterface) {\r\n this.value = this.value.map((val) => {\r\n if (val.name === this.activeInput) {\r\n return v\r\n }\r\n return val\r\n })\r\n }\r\n save() {\r\n this.valueChanged.emit(this.value);\r\n this.activeInput = '';\r\n }\r\n inputIsDisabled(input: FormColumnInputs): boolean {\r\n return input['element'] === 'sectionTitle'\r\n\r\n\r\n\r\n }\r\n mapTo(input: FormColumnInputs) {\r\n\r\n const inp = this.minInputInEdit;\r\n const mapToThis: MinInputMapInput = {\r\n formControlName: input.formControlName,\r\n dataType: input.dataType,\r\n element: input.element,\r\n inputId: input.id\r\n }\r\n\r\n if (!!inp && this.minInputInEdit?.type === MinInputTypes.MapTo) {\r\n (inp.mapTo as MinInputMapInput)?.formControlName === mapToThis.formControlName\r\n ? (inp.mapTo = undefined)\r\n : (inp.mapTo = mapToThis);\r\n }\r\n\r\n if (!!inp && this.minInputInEdit?.type === 'mapDocFilter') {\r\n if (this.inputMappedTo(mapToThis.formControlName)) {\r\n (inp.mapTo as MinInputMapInput[]).splice((inp.mapTo as MinInputMapInput[]).indexOf(mapToThis), 1)\r\n } else if (typeof inp.mapTo === \"string\" || !inp.mapTo || !!(inp.mapTo as MinInputMapInput[]).find(inp => typeof inp === \"string\")) {\r\n inp.mapTo = [mapToThis]\r\n } else {\r\n (inp.mapTo as MinInputMapInput[]).push(mapToThis)\r\n }\r\n }\r\n console.log(this.value)\r\n this.valueChanged.emit(this.value);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n }\r\n inputMappedTo(formControlName: string): boolean {\r\n if (this.minInputInEdit?.type === 'mapto') {\r\n return (this.minInputInEdit?.mapTo as MinInputMapInput)?.formControlName === formControlName\r\n }\r\n if (this.minInputInEdit?.type === 'mapDocFilter') {\r\n return !!(this.minInputInEdit?.mapTo as MinInputMapInput[])?.find(m => m.formControlName === formControlName)\r\n }\r\n return false\r\n }\r\n\r\n getInputIllustration(input: FormColumnInputs) {\r\n return getInputIllustration(input.element)\r\n }\r\n get formInputsToMapTo(): MapToInputs[] {\r\n return this.formInputs.filter((input) => !this.inputIsDisabled(input)).map((input) => {\r\n return {\r\n ...input,\r\n illustration: this.getInputIllustration(input),\r\n activated: this.inputMappedTo(input.formControlName)\r\n }\r\n })\r\n\r\n }\r\n get activatedInputs() {\r\n return this.formInputsToMapTo.find((input) => input.activated)\r\n }\r\n\r\n}\r\n","<mat-card>\r\n\r\n <mat-card-content>\r\n\r\n <div class=\"tree-instructions\" >\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>Ensure all required inputs are linked or have a default value.</span>\r\n </div>\r\n\r\n\r\n <mat-chip-listbox aria-label=\"Input selection\">\r\n <mat-chip-option\r\n [style.background]=\"( input.type === 'mapDocFilter' && !!input.mapTo || input.type === 'default' && !!input.defaultValue || input.type === 'mapto' && !!input.mapTo)&&activeInput !== input['name'] ? 'turquoise' : ''\"\r\n *ngFor=\"let input of value\" [selected]=\"activeInput === input['name']\"\r\n (click)=\"activeInput === input['name']? activeInput = '':activeInput = input['name']\">\r\n {{ input['name'] }}\r\n <mat-icon (click)=\"activeInput === input['name']? activeInput = '':activeInput = input['name']\" matChipRemove>{{\r\n input.type === 'mapDocFilter' && !!input.mapTo || input.type === 'default' && !!input.defaultValue ||\r\n input.type === 'mapto' && !!input.mapTo ? 'link' : 'link_off' }}</mat-icon>\r\n\r\n\r\n </mat-chip-option>\r\n </mat-chip-listbox>\r\n @if (!!activeInput && activeInput !== '') {\r\n <br>\r\n <ng-container *ngTemplateOutlet=\"MinInputEdit\">\r\n\r\n </ng-container>\r\n }\r\n\r\n\r\n\r\n </mat-card-content>\r\n</mat-card>\r\n\r\n\r\n\r\n<ng-template #MinInputEdit>\r\n <mat-form-field style=\"margin-bottom: 8px;\" appearance=\"outline\">\r\n <mat-label>Input handling method</mat-label>\r\n <mat-select (selectionChange)=\"minInputValueType($event.value)\" [value]=\"minInputInEdit.type\">\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>\r\n Select how this required input should be processed\r\n </mat-hint>\r\n </mat-form-field>\r\n\r\n\r\n\r\n <mat-form-field appearance=\"outline\" *ngIf=\"minInputInEdit?.type === 'default'\">\r\n <mat-label>Enter default value</mat-label>\r\n <input matInput [(ngModel)]=\"minInputInEdit.defaultValue\" placeholder=\"enter default\">\r\n <mat-hint>\r\n Enter a default value for this input\r\n </mat-hint>\r\n </mat-form-field>\r\n\r\n\r\n\r\n\r\n <mat-nav-list *ngIf=\"minInputInEdit?.type === 'mapto' || minInputInEdit?.type === 'mapDocFilter'\">\r\n <h5 mat-subheader>Select a form input to link the required input - {{ activeInput }} to</h5>\r\n @if(!!activatedInputs){\r\n <mat-list-item \r\n [activated]=\"activatedInputs.activated\"\r\n [disabled]=\"inputIsDisabled(activatedInputs)\" (click)=\" mapTo(activatedInputs); $event.stopPropagation()\">\r\n <img matListItemAvatar style=\"margin-left: 8px;\" [src]=\" getInputIllustration(activatedInputs) \"\r\n [alt]=\"activatedInputs.label\">\r\n <div matListItemTitle>{{activatedInputs[\"label\"] }}</div>\r\n <span matListItemMeta>\r\n <mat-icon color=\"primary\">\r\n check_circle\r\n </mat-icon>\r\n </span>\r\n </mat-list-item>\r\n }@else {\r\n\r\n @for(input of formInputsToMapTo;track input.id){\r\n <mat-list-item \r\n \r\n [disabled]=\"inputIsDisabled(input)\" (click)=\" mapTo(input); $event.stopPropagation()\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;background:azure\" [src]=\" getInputIllustration(input) \"\r\n [alt]=\"input.label\">\r\n <div matListItemTitle>{{ input[\"label\"] }}</div>\r\n <div matListItemLine style=\"font-size: 13px; opacity: 0.6;\">{{ input[\"formControlName\"] }}</div>\r\n <span matListItemMeta>\r\n <mat-icon >\r\n radio_button_unchecked\r\n </mat-icon>\r\n </span>\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n }\r\n\r\n\r\n <mat-list-item *ngIf=\"formInputs ? formInputs?.length === 0 : true\">\r\n Add inputs to get started\r\n </mat-list-item>\r\n </mat-nav-list>\r\n\r\n <p *ngIf=\"minInputInEdit?.type ? minInputInEdit?.type === 'bind' : true\">\r\n This input is already linked\r\n </p>\r\n <mat-divider></mat-divider>\r\n <mat-toolbar *ngIf=\"minInputInEdit?.type === 'default'\">\r\n <span class=\"spacer\"></span>\r\n <button mat-raised-button color=\"primary\" (click)=\"save()\">save</button>\r\n </mat-toolbar>\r\n</ng-template>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;MAyBa,uBAAuB,CAAA;aAI3B,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;IAMlB,WAAuC,CAAA,SAAoB,EAAU,WAAoC,EAAA;QAAlE,IAAS,CAAA,SAAA,GAAT,SAAS;QAAqB,IAAW,CAAA,WAAA,GAAX,WAAW;AALhF,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;AAEnB,QAAA,IAAA,CAAA,EAAE,GAAG,CAAuB,oBAAA,EAAA,uBAAuB,CAAE,MAAM,EAAE,EAAE;QAE9E,IAAW,CAAA,WAAA,GAAW,EAAE;QA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AA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,gBAAgB,u0GAAE,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,8MAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAK1C,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBARnC,SAAS;+BACE,qBAAqB,EAAA,UAAA,EACnB,IAAI,EACP,OAAA,EAAA,CAAC,YAAY,EAAE,gBAAgB,EAAE,WAAW,CAAC,aAG1C,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,uBAAwB,EAAE,CAAC,EAAA,QAAA,EAAA,6iJAAA,EAAA,MAAA,EAAA,CAAA,wVAAA,CAAA,EAAA;;0BAYtE;;0BAAY;kEAHV,EAAE,EAAA,CAAA;sBAAhB;gBAaY,MAAM,EAAA,CAAA;sBAAd;gBAgDQ,KAAK,EAAA,CAAA;sBAAjB;gBAUQ,UAAU,EAAA,CAAA;sBAAlB;gBACS,YAAY,EAAA,CAAA;sBAArB;;;;;"}
1
+ {"version":3,"file":"ngx-t-forms-required-inputs.component-aoZjTIVr.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 { CommonModule } from '@angular/common';\r\nimport { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\n\r\n\r\nimport { FormsModule, NgControl } from '@angular/forms';\r\n\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { MinimumInputRequiredInterface, MinInputMapInput, MinInputTypes } from 'ngx-t-forms-types';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { getInputIllustration } from '../../../../shared/functions/getInputIllustration';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { Subject } from 'rxjs';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\ninterface MapToInputs extends FormColumnInputs {\r\n illustration: string\r\n activated: boolean\r\n}\r\n@Component({\r\n selector: 'app-required-inputs',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule, FormsModule],\r\n templateUrl: './required-inputs.component.html',\r\n styleUrl: './required-inputs.component.scss',\r\n providers: [{ provide: MatFormFieldControl, useExisting:RequiredInputsComponent }],\r\n})\r\nexport class RequiredInputsComponent implements MatFormFieldControl<MinimumInputRequiredInterface[]> {\r\n\r\n\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n\r\n @HostBinding() id = `app-required-inputs-${RequiredInputsComponent .nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\n disabled: boolean = false;\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\nget errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n\r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.app-required-inputs');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n }\r\n onContainerClick(event: MouseEvent): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n private _value: Array<MinimumInputRequiredInterface> = []\r\n @Input() set value(v: Array<MinimumInputRequiredInterface>) {\r\n const changed = JSON.stringify(this._value) !== JSON.stringify(v)\r\n if (changed) {\r\n this._value = v\r\n }\r\n\r\n }\r\n get value() {\r\n return this._value\r\n }\r\n @Input() formInputs: FormColumnInputs[] = []\r\n @Output() valueChanged = new EventEmitter<any>();\r\n public activeInput: string = '';\r\n\r\n\r\n minInputTypes = MinInputTypes\r\n\r\n minInputValueType(type: MinInputTypes) {\r\n\r\n if (type === \"mapDocFilter\" && !!this.minInputInEdit) {\r\n ((this.minInputInEdit as any).mapTo as MinInputMapInput[]) = []\r\n\r\n }\r\n if (this.minInputInEdit?.type === type) {\r\n this.minInputInEdit.type = undefined;\r\n } else if (this.minInputInEdit) {\r\n this.minInputInEdit.type = type\r\n }\r\n\r\n this.valueChanged.emit(this.value)\r\n\r\n }\r\n get minInputInEdit(): MinimumInputRequiredInterface {\r\n return this.value?.find((v) => v.name === this.activeInput) || {} as MinimumInputRequiredInterface;\r\n }\r\n set minInputInEdit(v: MinimumInputRequiredInterface) {\r\n this.value = this.value.map((val) => {\r\n if (val.name === this.activeInput) {\r\n return v\r\n }\r\n return val\r\n })\r\n }\r\n save() {\r\n this.valueChanged.emit(this.value);\r\n this.activeInput = '';\r\n }\r\n inputIsDisabled(input: FormColumnInputs): boolean {\r\n return input['element'] === 'sectionTitle'\r\n\r\n\r\n\r\n }\r\n mapTo(input: FormColumnInputs) {\r\n\r\n const inp = this.minInputInEdit;\r\n const mapToThis: MinInputMapInput = {\r\n formControlName: input.formControlName,\r\n dataType: input.dataType,\r\n element: input.element,\r\n inputId: input.id\r\n }\r\n\r\n if (!!inp && this.minInputInEdit?.type === MinInputTypes.MapTo) {\r\n (inp.mapTo as MinInputMapInput)?.formControlName === mapToThis.formControlName\r\n ? (inp.mapTo = undefined)\r\n : (inp.mapTo = mapToThis);\r\n }\r\n\r\n if (!!inp && this.minInputInEdit?.type === 'mapDocFilter') {\r\n if (this.inputMappedTo(mapToThis.formControlName)) {\r\n (inp.mapTo as MinInputMapInput[]).splice((inp.mapTo as MinInputMapInput[]).indexOf(mapToThis), 1)\r\n } else if (typeof inp.mapTo === \"string\" || !inp.mapTo || !!(inp.mapTo as MinInputMapInput[]).find(inp => typeof inp === \"string\")) {\r\n inp.mapTo = [mapToThis]\r\n } else {\r\n (inp.mapTo as MinInputMapInput[]).push(mapToThis)\r\n }\r\n }\r\n console.log(this.value)\r\n this.valueChanged.emit(this.value);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n }\r\n inputMappedTo(formControlName: string): boolean {\r\n if (this.minInputInEdit?.type === 'mapto') {\r\n return (this.minInputInEdit?.mapTo as MinInputMapInput)?.formControlName === formControlName\r\n }\r\n if (this.minInputInEdit?.type === 'mapDocFilter') {\r\n return !!(this.minInputInEdit?.mapTo as MinInputMapInput[])?.find(m => m.formControlName === formControlName)\r\n }\r\n return false\r\n }\r\n\r\n getInputIllustration(input: FormColumnInputs) {\r\n return getInputIllustration(input.element)\r\n }\r\n get formInputsToMapTo(): MapToInputs[] {\r\n return this.formInputs.filter((input) => !this.inputIsDisabled(input)).map((input) => {\r\n return {\r\n ...input,\r\n illustration: this.getInputIllustration(input),\r\n activated: this.inputMappedTo(input.formControlName)\r\n }\r\n })\r\n\r\n }\r\n get activatedInputs() {\r\n return this.formInputsToMapTo.find((input) => input.activated)\r\n }\r\n\r\n}\r\n","<mat-card>\r\n\r\n <mat-card-content>\r\n\r\n <div class=\"tree-instructions\" >\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>Ensure all required inputs are linked or have a default value.</span>\r\n </div>\r\n\r\n\r\n <mat-chip-listbox aria-label=\"Input selection\">\r\n <mat-chip-option\r\n [style.background]=\"( input.type === 'mapDocFilter' && !!input.mapTo || input.type === 'default' && !!input.defaultValue || input.type === 'mapto' && !!input.mapTo)&&activeInput !== input['name'] ? 'turquoise' : ''\"\r\n *ngFor=\"let input of value\" [selected]=\"activeInput === input['name']\"\r\n (click)=\"activeInput === input['name']? activeInput = '':activeInput = input['name']\">\r\n {{ input['name'] }}\r\n <mat-icon (click)=\"activeInput === input['name']? activeInput = '':activeInput = input['name']\" matChipRemove>{{\r\n input.type === 'mapDocFilter' && !!input.mapTo || input.type === 'default' && !!input.defaultValue ||\r\n input.type === 'mapto' && !!input.mapTo ? 'link' : 'link_off' }}</mat-icon>\r\n\r\n\r\n </mat-chip-option>\r\n </mat-chip-listbox>\r\n @if (!!activeInput && activeInput !== '') {\r\n <br>\r\n <ng-container *ngTemplateOutlet=\"MinInputEdit\">\r\n\r\n </ng-container>\r\n }\r\n\r\n\r\n\r\n </mat-card-content>\r\n</mat-card>\r\n\r\n\r\n\r\n<ng-template #MinInputEdit>\r\n <mat-form-field style=\"margin-bottom: 8px;\" appearance=\"outline\">\r\n <mat-label>Input handling method</mat-label>\r\n <mat-select (selectionChange)=\"minInputValueType($event.value)\" [value]=\"minInputInEdit.type\">\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>\r\n Select how this required input should be processed\r\n </mat-hint>\r\n </mat-form-field>\r\n\r\n\r\n\r\n <mat-form-field appearance=\"outline\" *ngIf=\"minInputInEdit?.type === 'default'\">\r\n <mat-label>Enter default value</mat-label>\r\n <input matInput [(ngModel)]=\"minInputInEdit.defaultValue\" placeholder=\"enter default\">\r\n <mat-hint>\r\n Enter a default value for this input\r\n </mat-hint>\r\n </mat-form-field>\r\n\r\n\r\n\r\n\r\n <mat-nav-list *ngIf=\"minInputInEdit?.type === 'mapto' || minInputInEdit?.type === 'mapDocFilter'\">\r\n <h5 mat-subheader>Select a form input to link the required input - {{ activeInput }} to</h5>\r\n @if(!!activatedInputs){\r\n <mat-list-item \r\n [activated]=\"activatedInputs.activated\"\r\n [disabled]=\"inputIsDisabled(activatedInputs)\" (click)=\" mapTo(activatedInputs); $event.stopPropagation()\">\r\n <img matListItemAvatar style=\"margin-left: 8px;\" [src]=\" getInputIllustration(activatedInputs) \"\r\n [alt]=\"activatedInputs.label\">\r\n <div matListItemTitle>{{activatedInputs[\"label\"] }}</div>\r\n <span matListItemMeta>\r\n <mat-icon color=\"primary\">\r\n check_circle\r\n </mat-icon>\r\n </span>\r\n </mat-list-item>\r\n }@else {\r\n\r\n @for(input of formInputsToMapTo;track input.id){\r\n <mat-list-item \r\n \r\n [disabled]=\"inputIsDisabled(input)\" (click)=\" mapTo(input); $event.stopPropagation()\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;background:azure\" [src]=\" getInputIllustration(input) \"\r\n [alt]=\"input.label\">\r\n <div matListItemTitle>{{ input[\"label\"] }}</div>\r\n <div matListItemLine style=\"font-size: 13px; opacity: 0.6;\">{{ input[\"formControlName\"] }}</div>\r\n <span matListItemMeta>\r\n <mat-icon >\r\n radio_button_unchecked\r\n </mat-icon>\r\n </span>\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n }\r\n\r\n\r\n <mat-list-item *ngIf=\"formInputs ? formInputs?.length === 0 : true\">\r\n Add inputs to get started\r\n </mat-list-item>\r\n </mat-nav-list>\r\n\r\n <p *ngIf=\"minInputInEdit?.type ? minInputInEdit?.type === 'bind' : true\">\r\n This input is already linked\r\n </p>\r\n <mat-divider></mat-divider>\r\n <mat-toolbar *ngIf=\"minInputInEdit?.type === 'default'\">\r\n <span class=\"spacer\"></span>\r\n <button mat-raised-button color=\"primary\" (click)=\"save()\">save</button>\r\n </mat-toolbar>\r\n</ng-template>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAyBa,uBAAuB,CAAA;aAI3B,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;IAMlB,WAAuC,CAAA,SAAoB,EAAU,WAAoC,EAAA;QAAlE,IAAS,CAAA,SAAA,GAAT,SAAS;QAAqB,IAAW,CAAA,WAAA,GAAX,WAAW;AALhF,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;AAEnB,QAAA,IAAA,CAAA,EAAE,GAAG,CAAuB,oBAAA,EAAA,uBAAuB,CAAE,MAAM,EAAE,EAAE;QAE9E,IAAW,CAAA,WAAA,GAAW,EAAE;QAExB,IAAO,CAAA,OAAA,GAAY,KAAK;QAOxB,IAAQ,CAAA,QAAA,GAAY,KAAK;QACzB,IAAQ,CAAA,QAAA,GAAY,KAAK;QACZ,IAAM,CAAA,MAAA,GAAoC,EAAE;QAyBzD,IAAO,CAAA,OAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAK,GAAG;QAqBZ,IAAM,CAAA,MAAA,GAAyC,EAAE;QAWhD,IAAU,CAAA,UAAA,GAAuB,EAAE;AAClC,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAO;QACzC,IAAW,CAAA,WAAA,GAAW,EAAE;QAG/B,IAAa,CAAA,aAAA,GAAG,aAAa;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DAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAK1C,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBARnC,SAAS;+BACE,qBAAqB,EAAA,UAAA,EACnB,IAAI,EACP,OAAA,EAAA,CAAC,YAAY,EAAE,gBAAgB,EAAE,WAAW,CAAC,aAG1C,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,uBAAwB,EAAE,CAAC,EAAA,QAAA,EAAA,6iJAAA,EAAA,MAAA,EAAA,CAAA,wVAAA,CAAA,EAAA;;0BAYtE;;0BAAY;kEAHV,EAAE,EAAA,CAAA;sBAAhB;gBAaY,MAAM,EAAA,CAAA;sBAAd;gBAgDQ,KAAK,EAAA,CAAA;sBAAjB;gBAUQ,UAAU,EAAA,CAAA;sBAAlB;gBACS,YAAY,EAAA,CAAA;sBAArB;;;;;"}
@@ -4,7 +4,7 @@ import * as i2 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i1$1 from '@angular/forms';
6
6
  import { FormsModule } from '@angular/forms';
7
- import { e as TreeComponent, M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-C6wZyKbR.mjs';
7
+ import { e as TreeComponent, M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-DOtego0e.mjs';
8
8
  import * as i1 from '@angular/common/http';
9
9
  import { HttpErrorResponse } from '@angular/common/http';
10
10
  import { BehaviorSubject, take, tap, catchError, throwError, Subject } from 'rxjs';
@@ -134,10 +134,10 @@ class PostmanCollectionsComponent {
134
134
  getNodeLines(level) {
135
135
  return Array(level).fill(0).map((_, i) => i + 1);
136
136
  }
137
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PostmanCollectionsComponent, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
138
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: PostmanCollectionsComponent, isStandalone: true, selector: "app-postman-collections", inputs: { postmanCollectionConfig: "postmanCollectionConfig", loadingEndPoints: "loadingEndPoints" }, outputs: { nodeSelectionChanged: "nodeSelectionChanged" }, ngImport: i0, template: "\n@if (!!loading ) {\n<div class=\"loadingContainer\">\n <mat-spinner></mat-spinner>\n</div>\n\n}\n@if(!loading){\n <mat-toolbar class=\"search-container\">\n <mat-icon>\n search\n </mat-icon>\n <input type=\"search\" \n placeholder=\"Search api\" \n class=\"search-field\"\n (input)=\"searchTree($event)\"> \n </mat-toolbar>\n <mat-divider ></mat-divider>\n <ng-container *ngIf=\"treeComponent as tree\">\n <mat-tree [dataSource]=\"tree.dataSource\" [treeControl]=\" tree.treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n @if (loadingEndPoints.includes(node.value.id)) {\n <mat-spinner diameter=\"22\" class=\"loading-spinner\" >\n \n </mat-spinner>\n }\n <div class=\"line\" *ngFor=\"let line of getNodeLines(node.level)\" [style.left]=\"line* 40 +8 + 'px'\"></div>\n <button [disabled]=\"!node.value?.request?.body?.raw && node.value.request.method ==='POST' || !node.value?.request?.url?.raw \"\n (click)=\"selectNode(node.value)\" [matTooltip]=\"node.value?.request?.url?.raw || 'Invalid Postman config,missing Endpoint URL'\" class=\"item\" mat-button\n *ngIf=\"node.value?.request\">\n \n <span class=\"node-key method\" [style.color]=\" methodColor(node.value.request.method)\">\n <!-- -->\n\n {{node.value.request.method}}</span>\n <span>\n \n {{ node.key }} \n \n </span>\n </button>\n \n </mat-tree-node>\n \n <mat-tree-node *matTreeNodeDef=\"let node; when: tree.hasChild\" matTreeNodePadding>\n <button style=\"padding: 0px; \n \" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'Toggle ' + node.key\">\n <mat-icon>\n \n {{tree.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n \n </button>\n \n <mat-icon style=\"color: var(--ion-color-medium)\">\n {{tree.treeControl.isExpanded(node) ? 'folder_open' : 'folder'}}\n\n </mat-icon>\n <span style=\"margin-left: 8px;font-weight:500\">\n \n {{ node.key }}\n </span>\n \n </mat-tree-node>\n </mat-tree>\n \n </ng-container>\n <ng-container *ngIf=\"error\">\n <mat-toolbar>\n <span style=\"color: red ;font-size:14px; line-height: normal;\n text-wrap: auto;\">\n {{error.message}}\n </span>\n </mat-toolbar>\n </ng-container>\n}\n", styles: ["mat-tree-node{min-height:28px!important;height:32px!important}.breadcrumb-container{display:flex;align-items:center;flex-wrap:wrap;padding:8px 0}.breadcrumb-item{display:inline-flex;align-items:center;margin:0;transition:background-color .3s ease}.breadcrumb-separator{margin:0}.breadcrumb-separator .mat-icon{font-size:16px;width:16px;height:16px}.suggestion-container{display:flex;width:100%;gap:14px}.suggestion-column{flex:1;min-width:0}.button-container{display:flex;flex-wrap:wrap}.suggestion-button{--padding-start: 8px;--padding-end: 8px;--padding-top: 2px;--padding-bottom: 4px;height:auto;font-size:.8em;text-transform:capitalize}.suggestion-button ::ng-deep ion-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}h5{margin-bottom:8px;font-size:1em}mat-tree{background:none}.item{text-align:left;display:flex;width:100%;justify-content:left;font-size:small;white-space:nowrap;font-weight:400;overflow:hidden}.method{display:inline-block;width:38px;text-align:right}.line{position:absolute;height:32px;left:48px;background:var(--mat-divider-color, var(--mat-app-outline));width:1px}.loadingContainer{display:flex;justify-content:center;align-items:center;padding:24px;height:100%}.search-field{width:100%;padding:8px;border:1px solid var(--mat-divider-color, var(--mat-app-outline));border-radius:4px;margin-left:14px}.search-container{background:inherit;padding-left:12px;padding-right:12px;height:48px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i3.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i3.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i3.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i3.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: FormsModule }] }); }
137
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PostmanCollectionsComponent, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
138
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: PostmanCollectionsComponent, isStandalone: true, selector: "app-postman-collections", inputs: { postmanCollectionConfig: "postmanCollectionConfig", loadingEndPoints: "loadingEndPoints" }, outputs: { nodeSelectionChanged: "nodeSelectionChanged" }, ngImport: i0, template: "\n@if (!!loading ) {\n<div class=\"loadingContainer\">\n <mat-spinner></mat-spinner>\n</div>\n\n}\n@if(!loading){\n <mat-toolbar class=\"search-container\">\n <mat-icon>\n search\n </mat-icon>\n <input type=\"search\" \n placeholder=\"Search api\" \n class=\"search-field\"\n (input)=\"searchTree($event)\"> \n </mat-toolbar>\n <mat-divider ></mat-divider>\n <ng-container *ngIf=\"treeComponent as tree\">\n <mat-tree [dataSource]=\"tree.dataSource\" [treeControl]=\" tree.treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n @if (loadingEndPoints.includes(node.value.id)) {\n <mat-spinner diameter=\"22\" class=\"loading-spinner\" >\n \n </mat-spinner>\n }\n <div class=\"line\" *ngFor=\"let line of getNodeLines(node.level)\" [style.left]=\"line* 40 +8 + 'px'\"></div>\n <button [disabled]=\"!node.value?.request?.body?.raw && node.value.request.method ==='POST' || !node.value?.request?.url?.raw \"\n (click)=\"selectNode(node.value)\" [matTooltip]=\"node.value?.request?.url?.raw || 'Invalid Postman config,missing Endpoint URL'\" class=\"item\" mat-button\n *ngIf=\"node.value?.request\">\n \n <span class=\"node-key method\" [style.color]=\" methodColor(node.value.request.method)\">\n <!-- -->\n\n {{node.value.request.method}}</span>\n <span>\n \n {{ node.key }} \n \n </span>\n </button>\n \n </mat-tree-node>\n \n <mat-tree-node *matTreeNodeDef=\"let node; when: tree.hasChild\" matTreeNodePadding>\n <button style=\"padding: 0px; \n \" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'Toggle ' + node.key\">\n <mat-icon>\n \n {{tree.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n \n </button>\n \n <mat-icon style=\"color: var(--ion-color-medium)\">\n {{tree.treeControl.isExpanded(node) ? 'folder_open' : 'folder'}}\n\n </mat-icon>\n <span style=\"margin-left: 8px;font-weight:500\">\n \n {{ node.key }}\n </span>\n \n </mat-tree-node>\n </mat-tree>\n \n </ng-container>\n <ng-container *ngIf=\"error\">\n <mat-toolbar>\n <span style=\"color: red ;font-size:14px; line-height: normal;\n text-wrap: auto;\">\n {{error.message}}\n </span>\n </mat-toolbar>\n </ng-container>\n}\n", styles: ["mat-tree-node{min-height:28px!important;height:32px!important}.breadcrumb-container{display:flex;align-items:center;flex-wrap:wrap;padding:8px 0}.breadcrumb-item{display:inline-flex;align-items:center;margin:0;transition:background-color .3s ease}.breadcrumb-separator{margin:0}.breadcrumb-separator .mat-icon{font-size:16px;width:16px;height:16px}.suggestion-container{display:flex;width:100%;gap:14px}.suggestion-column{flex:1;min-width:0}.button-container{display:flex;flex-wrap:wrap}.suggestion-button{--padding-start: 8px;--padding-end: 8px;--padding-top: 2px;--padding-bottom: 4px;height:auto;font-size:.8em;text-transform:capitalize}.suggestion-button ::ng-deep ion-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}h5{margin-bottom:8px;font-size:1em}mat-tree{background:none}.item{text-align:left;display:flex;width:100%;justify-content:left;font-size:small;white-space:nowrap;font-weight:400;overflow:hidden}.method{display:inline-block;width:38px;text-align:right}.line{position:absolute;height:32px;left:48px;background:var(--mat-divider-color, var(--mat-app-outline));width:1px}.loadingContainer{display:flex;justify-content:center;align-items:center;padding:24px;height:100%}.search-field{width:100%;padding:8px;border:1px solid var(--mat-divider-color, var(--mat-app-outline));border-radius:4px;margin-left:14px}.search-container{background:inherit;padding-left:12px;padding-right:12px;height:48px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i3.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i3.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i3.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i3.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: FormsModule }] }); }
139
139
  }
140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PostmanCollectionsComponent, decorators: [{
140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PostmanCollectionsComponent, decorators: [{
141
141
  type: Component,
142
142
  args: [{ selector: 'app-postman-collections', standalone: true, imports: [CommonModule, MatModulesModule, FormsModule], template: "\n@if (!!loading ) {\n<div class=\"loadingContainer\">\n <mat-spinner></mat-spinner>\n</div>\n\n}\n@if(!loading){\n <mat-toolbar class=\"search-container\">\n <mat-icon>\n search\n </mat-icon>\n <input type=\"search\" \n placeholder=\"Search api\" \n class=\"search-field\"\n (input)=\"searchTree($event)\"> \n </mat-toolbar>\n <mat-divider ></mat-divider>\n <ng-container *ngIf=\"treeComponent as tree\">\n <mat-tree [dataSource]=\"tree.dataSource\" [treeControl]=\" tree.treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n @if (loadingEndPoints.includes(node.value.id)) {\n <mat-spinner diameter=\"22\" class=\"loading-spinner\" >\n \n </mat-spinner>\n }\n <div class=\"line\" *ngFor=\"let line of getNodeLines(node.level)\" [style.left]=\"line* 40 +8 + 'px'\"></div>\n <button [disabled]=\"!node.value?.request?.body?.raw && node.value.request.method ==='POST' || !node.value?.request?.url?.raw \"\n (click)=\"selectNode(node.value)\" [matTooltip]=\"node.value?.request?.url?.raw || 'Invalid Postman config,missing Endpoint URL'\" class=\"item\" mat-button\n *ngIf=\"node.value?.request\">\n \n <span class=\"node-key method\" [style.color]=\" methodColor(node.value.request.method)\">\n <!-- -->\n\n {{node.value.request.method}}</span>\n <span>\n \n {{ node.key }} \n \n </span>\n </button>\n \n </mat-tree-node>\n \n <mat-tree-node *matTreeNodeDef=\"let node; when: tree.hasChild\" matTreeNodePadding>\n <button style=\"padding: 0px; \n \" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'Toggle ' + node.key\">\n <mat-icon>\n \n {{tree.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n \n </button>\n \n <mat-icon style=\"color: var(--ion-color-medium)\">\n {{tree.treeControl.isExpanded(node) ? 'folder_open' : 'folder'}}\n\n </mat-icon>\n <span style=\"margin-left: 8px;font-weight:500\">\n \n {{ node.key }}\n </span>\n \n </mat-tree-node>\n </mat-tree>\n \n </ng-container>\n <ng-container *ngIf=\"error\">\n <mat-toolbar>\n <span style=\"color: red ;font-size:14px; line-height: normal;\n text-wrap: auto;\">\n {{error.message}}\n </span>\n </mat-toolbar>\n </ng-container>\n}\n", styles: ["mat-tree-node{min-height:28px!important;height:32px!important}.breadcrumb-container{display:flex;align-items:center;flex-wrap:wrap;padding:8px 0}.breadcrumb-item{display:inline-flex;align-items:center;margin:0;transition:background-color .3s ease}.breadcrumb-separator{margin:0}.breadcrumb-separator .mat-icon{font-size:16px;width:16px;height:16px}.suggestion-container{display:flex;width:100%;gap:14px}.suggestion-column{flex:1;min-width:0}.button-container{display:flex;flex-wrap:wrap}.suggestion-button{--padding-start: 8px;--padding-end: 8px;--padding-top: 2px;--padding-bottom: 4px;height:auto;font-size:.8em;text-transform:capitalize}.suggestion-button ::ng-deep ion-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}h5{margin-bottom:8px;font-size:1em}mat-tree{background:none}.item{text-align:left;display:flex;width:100%;justify-content:left;font-size:small;white-space:nowrap;font-weight:400;overflow:hidden}.method{display:inline-block;width:38px;text-align:right}.line{position:absolute;height:32px;left:48px;background:var(--mat-divider-color, var(--mat-app-outline));width:1px}.loadingContainer{display:flex;justify-content:center;align-items:center;padding:24px;height:100%}.search-field{width:100%;padding:8px;border:1px solid var(--mat-divider-color, var(--mat-app-outline));border-radius:4px;margin-left:14px}.search-container{background:inherit;padding-left:12px;padding-right:12px;height:48px}\n"] }]
143
143
  }], ctorParameters: () => [{ type: i1.HttpClient }], propDecorators: { nodeSelectionChanged: [{
@@ -264,10 +264,10 @@ class RestApiCallSetupComponent {
264
264
  get hasValidValue() {
265
265
  return Boolean(this.value) && Boolean(this.value?.httpEndPoint) && Boolean(this.value?.httpMethod);
266
266
  }
267
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: RestApiCallSetupComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
268
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: RestApiCallSetupComponent, isStandalone: true, selector: "lib-rest-api-call-setup", inputs: { postmanCollectionConfig: "postmanCollectionConfig", httpGetDataFunction: "httpGetDataFunction", value: "value", errors: "errors" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: RestApiCallSetupComponent }], ngImport: i0, template: "\r\n@if(postmanCollectionConfig && !hasValidValue ){\r\n <app-postman-collections \r\n (nodeSelectionChanged)=\"nodeSelectionChanged($event)\"\r\n [loadingEndPoints]=\"loadingEndPoints\"\r\n [postmanCollectionConfig]=\"postmanCollectionConfig\" >\r\n \r\n </app-postman-collections>\r\n}\r\n\r\n@if(!!hasValidValue && !!postmanCollectionConfig){\r\n<mat-toolbar>\r\n \r\n <button \r\n (click)=\"clearValue()\" [matTooltip]=\"value?.httpEndPoint\" class=\"item\" mat-flat-button\r\n >\r\n\r\n <span class=\"node-key method\" [style.color]=\" methodColor(value?.httpMethod)\">\r\n {{value?.httpMethod}}</span>\r\n <span>\r\n {{ value?.name }} \r\n\r\n </span>\r\n </button> \r\n</mat-toolbar>\r\n\r\n}\r\n\r\n@if(!postmanCollectionConfig) {\r\n <mat-toolbar color=\"warn\">\r\n <p style=\"font-size: 14px; white-space: normal;\r\n line-height: normal;\">\r\n No postman collection configured. \r\n Add Postman collection Id and Api key\r\n </p>\r\n \r\n </mat-toolbar>\r\n \r\n}\r\n", styles: [".item{text-align:left;display:flex;width:100%;justify-content:left;font-size:small;white-space:nowrap;font-weight:400;overflow:hidden}.center{display:flex!important;align-items:center}\n"], dependencies: [{ kind: "component", type: PostmanCollectionsComponent, selector: "app-postman-collections", inputs: ["postmanCollectionConfig", "loadingEndPoints"], outputs: ["nodeSelectionChanged"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: CommonModule }] }); }
267
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RestApiCallSetupComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
268
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: RestApiCallSetupComponent, isStandalone: true, selector: "lib-rest-api-call-setup", inputs: { postmanCollectionConfig: "postmanCollectionConfig", httpGetDataFunction: "httpGetDataFunction", value: "value", errors: "errors" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: RestApiCallSetupComponent }], ngImport: i0, template: "\r\n@if(postmanCollectionConfig && !hasValidValue ){\r\n <app-postman-collections \r\n (nodeSelectionChanged)=\"nodeSelectionChanged($event)\"\r\n [loadingEndPoints]=\"loadingEndPoints\"\r\n [postmanCollectionConfig]=\"postmanCollectionConfig\" >\r\n \r\n </app-postman-collections>\r\n}\r\n\r\n@if(!!hasValidValue && !!postmanCollectionConfig){\r\n<mat-toolbar>\r\n \r\n <button \r\n (click)=\"clearValue()\" [matTooltip]=\"value?.httpEndPoint\" class=\"item\" mat-flat-button\r\n >\r\n\r\n <span class=\"node-key method\" [style.color]=\" methodColor(value?.httpMethod)\">\r\n {{value?.httpMethod}}</span>\r\n <span>\r\n {{ value?.name }} \r\n\r\n </span>\r\n </button> \r\n</mat-toolbar>\r\n\r\n}\r\n\r\n@if(!postmanCollectionConfig) {\r\n <mat-toolbar color=\"warn\">\r\n <p style=\"font-size: 14px; white-space: normal;\r\n line-height: normal;\">\r\n No postman collection configured. \r\n Add Postman collection Id and Api key\r\n </p>\r\n \r\n </mat-toolbar>\r\n \r\n}\r\n", styles: [".item{text-align:left;display:flex;width:100%;justify-content:left;font-size:small;white-space:nowrap;font-weight:400;overflow:hidden}.center{display:flex!important;align-items:center}\n"], dependencies: [{ kind: "component", type: PostmanCollectionsComponent, selector: "app-postman-collections", inputs: ["postmanCollectionConfig", "loadingEndPoints"], outputs: ["nodeSelectionChanged"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: CommonModule }] }); }
269
269
  }
270
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: RestApiCallSetupComponent, decorators: [{
270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RestApiCallSetupComponent, decorators: [{
271
271
  type: Component,
272
272
  args: [{ selector: 'lib-rest-api-call-setup', standalone: true, imports: [PostmanCollectionsComponent, MatModulesModule, CommonModule], providers: [{ provide: MatFormFieldControl, useExisting: RestApiCallSetupComponent }], template: "\r\n@if(postmanCollectionConfig && !hasValidValue ){\r\n <app-postman-collections \r\n (nodeSelectionChanged)=\"nodeSelectionChanged($event)\"\r\n [loadingEndPoints]=\"loadingEndPoints\"\r\n [postmanCollectionConfig]=\"postmanCollectionConfig\" >\r\n \r\n </app-postman-collections>\r\n}\r\n\r\n@if(!!hasValidValue && !!postmanCollectionConfig){\r\n<mat-toolbar>\r\n \r\n <button \r\n (click)=\"clearValue()\" [matTooltip]=\"value?.httpEndPoint\" class=\"item\" mat-flat-button\r\n >\r\n\r\n <span class=\"node-key method\" [style.color]=\" methodColor(value?.httpMethod)\">\r\n {{value?.httpMethod}}</span>\r\n <span>\r\n {{ value?.name }} \r\n\r\n </span>\r\n </button> \r\n</mat-toolbar>\r\n\r\n}\r\n\r\n@if(!postmanCollectionConfig) {\r\n <mat-toolbar color=\"warn\">\r\n <p style=\"font-size: 14px; white-space: normal;\r\n line-height: normal;\">\r\n No postman collection configured. \r\n Add Postman collection Id and Api key\r\n </p>\r\n \r\n </mat-toolbar>\r\n \r\n}\r\n", styles: [".item{text-align:left;display:flex;width:100%;justify-content:left;font-size:small;white-space:nowrap;font-weight:400;overflow:hidden}.center{display:flex!important;align-items:center}\n"] }]
273
273
  }], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
@@ -289,4 +289,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
289
289
  }] } });
290
290
 
291
291
  export { RestApiCallSetupComponent };
292
- //# sourceMappingURL=ngx-t-forms-rest-api-call-setup.component-59CnCXEt.mjs.map
292
+ //# sourceMappingURL=ngx-t-forms-rest-api-call-setup.component-HDQwuGiu.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-t-forms-rest-api-call-setup.component-59CnCXEt.mjs","sources":["../../../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":["import { IFolderItem, IGetPostmanCollections } from 'ngx-t-forms-types';\r\n\r\n// Update the filter function signature\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\r\n return items.filter(collection => {\r\n return searchInItems(collection.item, searchText);\r\n })\r\n \r\n}\r\n\r\nexport function searchInItems(\r\n items: IFolderItem[], \r\n searchText: string\r\n): boolean {\r\n if (!items) return false;\r\n\r\n for (const item of items) {\r\n // Check if current item matches search\r\n if (item.name?.toLowerCase().includes(searchText) || \r\n item.description?.toLowerCase().includes(searchText)) {\r\n return true;\r\n }\r\n\r\n // Recursively search in nested items\r\n if (item.item && searchInItems(item.item, searchText)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n}","export function methodColor(method: string): string {\r\n switch (method) {\r\n case 'GET':\r\n return 'green';\r\n case 'POST':\r\n return 'chocolate';\r\n case 'PUT':\r\n return 'yellow'; \r\n case 'DELETE':\r\n return 'red';\r\n default:\r\n return 'currentColor';\r\n }\r\n }","import { CommonModule } from '@angular/common';\r\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { TreeComponent } from '../api-value-access-rules/functions/convertDataToTree';\r\nimport { IFolderItem, IGetPostmanCollections, IPostmanCollectionConfig } from \"ngx-t-forms-types\";\r\n\r\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\r\nimport { BehaviorSubject, catchError, Observable, take, tap, throwError } from 'rxjs';\r\nimport { convertPostmanFolderItemsToTree } from './functions/convertPostmanCollectionToTree';\r\nimport { filterCollectionItems } from './functions/filterCollectionItems';\r\nimport { methodColor } from './functions/methodColors';\r\n\r\n@Component({\r\n selector: 'app-postman-collections',\r\n templateUrl: './postman-collections.component.html',\r\n styleUrls: ['./postman-collections.component.scss'],\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule, FormsModule]\r\n})\r\nexport class PostmanCollectionsComponent implements OnInit {\r\n\r\n private _collection$: BehaviorSubject<IGetPostmanCollections | undefined> = new BehaviorSubject<IGetPostmanCollections | undefined>(undefined)\r\n get collection$(): Observable<IGetPostmanCollections | undefined> {\r\n return this._collection$.asObservable();\r\n }\r\n treeComponent = new TreeComponent();\r\n\r\n\r\n @Output() nodeSelectionChanged = new EventEmitter<IFolderItem>();\r\n\r\n constructor(private readonly httpClient: HttpClient) { }\r\n ngOnInit(): void {\r\n this.initializePostmanService()\r\n }\r\n _searchKey: string = ''\r\n\r\n @Input() postmanCollectionConfig: IPostmanCollectionConfig | undefined\r\n @Input() loadingEndPoints:string[] = []\r\n \r\n selectNode(node: IFolderItem): void {\r\n this.nodeSelectionChanged.emit(node);\r\n }\r\n\r\n private isValidConfig(config: IPostmanCollectionConfig | undefined): boolean {\r\n return Boolean(config?.collectionUrl && config?.collectionKey);\r\n }\r\n\r\n\r\n error: HttpErrorResponse | undefined\r\n loading: boolean = false\r\n private initializePostmanService(): void {\r\n const isValidConfig = this.isValidConfig(this.postmanCollectionConfig)\r\n if (!isValidConfig) {\r\n this.error = new HttpErrorResponse({\r\n error: 'Invalid Postman Collection Config',\r\n })\r\n return\r\n }\r\n const { collectionUrl, collectionKey } = this.postmanCollectionConfig!\r\n \r\n const requestOptions = {\r\n params: {\r\n apikey: collectionKey,\r\n clearSystemHeaders: true\r\n },\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n\r\n }\r\n }\r\n this.loading = true\r\n this.httpClient.get<IGetPostmanCollections>(\r\n collectionUrl,\r\n requestOptions\r\n ).pipe(\r\n take(1),\r\n tap((data) => {\r\n this._collection$.next(data)\r\n // To ensure the data can be shown as a tree\r\n const treeData = convertPostmanFolderItemsToTree(data.collection.item);\r\n this.treeComponent.assignDataSourceData(treeData)\r\n this.error = undefined\r\n this.loading = false\r\n }),\r\n catchError((err: HttpErrorResponse) => {\r\n this.loading = false\r\n this.error = err\r\n console.error(err)\r\n return throwError(err)\r\n })\r\n ).subscribe();\r\n }\r\n methodColor(method: string): string {\r\n return methodColor(method)\r\n }\r\n searchTree(event: any): void {\r\n const search: string = event.target.value\r\n this.collection$.pipe(\r\n take(1),\r\n tap((collection) => {\r\n if (!collection) {\r\n return\r\n }\r\n const items = filterCollectionItems(collection, search)\r\n const treeData = convertPostmanFolderItemsToTree(items);\r\n this.treeComponent.assignDataSourceData(treeData)\r\n\r\n\r\n })\r\n ).subscribe()\r\n }\r\n getNodeLines(level: number): number[] {\r\n return Array(level).fill(0).map((_, i) => i + 1)\r\n }\r\n}\r\n","\n@if (!!loading ) {\n<div class=\"loadingContainer\">\n <mat-spinner></mat-spinner>\n</div>\n\n}\n@if(!loading){\n <mat-toolbar class=\"search-container\">\n <mat-icon>\n search\n </mat-icon>\n <input type=\"search\" \n placeholder=\"Search api\" \n class=\"search-field\"\n (input)=\"searchTree($event)\"> \n </mat-toolbar>\n <mat-divider ></mat-divider>\n <ng-container *ngIf=\"treeComponent as tree\">\n <mat-tree [dataSource]=\"tree.dataSource\" [treeControl]=\" tree.treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n @if (loadingEndPoints.includes(node.value.id)) {\n <mat-spinner diameter=\"22\" class=\"loading-spinner\" >\n \n </mat-spinner>\n }\n <div class=\"line\" *ngFor=\"let line of getNodeLines(node.level)\" [style.left]=\"line* 40 +8 + 'px'\"></div>\n <button [disabled]=\"!node.value?.request?.body?.raw && node.value.request.method ==='POST' || !node.value?.request?.url?.raw \"\n (click)=\"selectNode(node.value)\" [matTooltip]=\"node.value?.request?.url?.raw || 'Invalid Postman config,missing Endpoint URL'\" class=\"item\" mat-button\n *ngIf=\"node.value?.request\">\n \n <span class=\"node-key method\" [style.color]=\" methodColor(node.value.request.method)\">\n <!-- -->\n\n {{node.value.request.method}}</span>\n <span>\n \n {{ node.key }} \n \n </span>\n </button>\n \n </mat-tree-node>\n \n <mat-tree-node *matTreeNodeDef=\"let node; when: tree.hasChild\" matTreeNodePadding>\n <button style=\"padding: 0px; \n \" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'Toggle ' + node.key\">\n <mat-icon>\n \n {{tree.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n \n </button>\n \n <mat-icon style=\"color: var(--ion-color-medium)\">\n {{tree.treeControl.isExpanded(node) ? 'folder_open' : 'folder'}}\n\n </mat-icon>\n <span style=\"margin-left: 8px;font-weight:500\">\n \n {{ node.key }}\n </span>\n \n </mat-tree-node>\n </mat-tree>\n \n </ng-container>\n <ng-container *ngIf=\"error\">\n <mat-toolbar>\n <span style=\"color: red ;font-size:14px; line-height: normal;\n text-wrap: auto;\">\n {{error.message}}\n </span>\n </mat-toolbar>\n </ng-container>\n}\n","import { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\nimport { PostmanCollectionsComponent } from '../postman-collections/postman-collections.component';\r\nimport { IFolderItem, IPostmanCollectionConfig } from \"ngx-t-forms-types\";\r\nimport { APIDataFetchingConfigurationInterface } from 'ngx-t-forms-types';\r\nimport { DataSources } from \"ngx-t-forms-types\";\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { methodColor } from '../postman-collections/functions/methodColors';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { NgControl } from '@angular/forms';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\n@Component({\r\n selector: 'lib-rest-api-call-setup',\r\n standalone: true,\r\n imports: [PostmanCollectionsComponent,MatModulesModule,CommonModule],\r\n providers: [{ provide: MatFormFieldControl, useExisting:RestApiCallSetupComponent}],\r\n templateUrl: './rest-api-call-setup.component.html',\r\n styleUrl: './rest-api-call-setup.component.css'\r\n})\r\nexport class RestApiCallSetupComponent implements MatFormFieldControl<APIDataFetchingConfigurationInterface | undefined> {\r\n \r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n \r\n @HostBinding() id = `lib-rest-api-call-setup-${RestApiCallSetupComponent.nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\n disabled: boolean = false;\r\n get errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n \r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.lib-rest-api-call-setup');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n }\r\n onContainerClick(event: MouseEvent): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n \r\n touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n \r\n \r\n \r\n @Input() postmanCollectionConfig: IPostmanCollectionConfig | undefined\r\n @Input() httpGetDataFunction: ((url: string,options:any) => Observable<any>) | undefined = undefined\r\n private _value: APIDataFetchingConfigurationInterface | undefined;\r\n @Input() \r\n set value(val: APIDataFetchingConfigurationInterface | undefined) {\r\n if (JSON.stringify(val) !== JSON.stringify(this._value)) {\r\n this._value = val;\r\n }\r\n }\r\n get value(): APIDataFetchingConfigurationInterface | undefined {\r\n return this._value;\r\n }\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n @Output() valueChanged = new EventEmitter<APIDataFetchingConfigurationInterface | undefined >();\r\n loadingEndPoints: string[] = []\r\n async nodeSelectionChanged(node: IFolderItem) {\r\n\r\n const { id, name, request, response } = node;\r\n \r\n if(!request || !response) return;\r\n let requestBody\r\n try {\r\n requestBody = JSON.parse(request?.body?.raw || '{}')\r\n } catch (error) {\r\n console.error(\"API BODY PARSE ERROR\")\r\n requestBody = {}\r\n }\r\n \r\n \r\n\r\n \r\n const keyExtraction = (key: string, value: any, primaryKey: boolean) => {\r\n return ({\r\n name: key,\r\n type: typeof value,\r\n primaryKey\r\n }) as any\r\n }\r\n\r\n // if(request.method === 'GET'){\r\n // this.loadingEndPoints.push(id)\r\n // try {\r\n // responseBody = await this.httpGetDataFunction?.(request.url.raw)\r\n // } catch (error) {\r\n // console.error(error)\r\n // this.loadingEndPoints = this.loadingEndPoints.filter((item) => item !== id)\r\n // }\r\n\r\n // }\r\n \r\n const secondaryKeys = Object.entries(requestBody['data'] || {}).map(([key, value]) => keyExtraction(key, value, false))\r\n delete requestBody['data']\r\n\r\n const primaryKeys = Object.entries(requestBody).map(([key, value]) => keyExtraction(key, value, true))\r\n const minimumInputRequired: any = request?.method === 'POST' ? [...primaryKeys, ...secondaryKeys] : []\r\n const transformedNode= {\r\n _id: id,\r\n name: name,\r\n httpEndPoint: request.url.raw,\r\n httpMethod: request.method,\r\n source: DataSources.Api,\r\n postFormData: request.method === 'POST',\r\n backEndConfig: {\r\n minimumInputRequired,\r\n },\r\n \r\n } as APIDataFetchingConfigurationInterface \r\n const fetch: any = transformedNode;\r\n console.log(fetch)\r\n this.valueChanged.emit(fetch);\r\n }\r\n clearValue() {\r\n const source = this.value?.source as any\r\n this._value = undefined;\r\n this.valueChanged.emit(undefined);\r\n this.valueChanged.emit({source:source} as any);\r\n }\r\n methodColor(method: string| undefined): string {\r\n return methodColor(method||'POST')\r\n }\r\n get hasValidValue(){\r\n return Boolean(this.value) && Boolean(this.value?.httpEndPoint) && Boolean(this.value?.httpMethod) \r\n }\r\n \r\n}\r\n","\r\n@if(postmanCollectionConfig && !hasValidValue ){\r\n <app-postman-collections \r\n (nodeSelectionChanged)=\"nodeSelectionChanged($event)\"\r\n [loadingEndPoints]=\"loadingEndPoints\"\r\n [postmanCollectionConfig]=\"postmanCollectionConfig\" >\r\n \r\n </app-postman-collections>\r\n}\r\n\r\n@if(!!hasValidValue && !!postmanCollectionConfig){\r\n<mat-toolbar>\r\n \r\n <button \r\n (click)=\"clearValue()\" [matTooltip]=\"value?.httpEndPoint\" class=\"item\" mat-flat-button\r\n >\r\n\r\n <span class=\"node-key method\" [style.color]=\" methodColor(value?.httpMethod)\">\r\n {{value?.httpMethod}}</span>\r\n <span>\r\n {{ value?.name }} \r\n\r\n </span>\r\n </button> \r\n</mat-toolbar>\r\n\r\n}\r\n\r\n@if(!postmanCollectionConfig) {\r\n <mat-toolbar color=\"warn\">\r\n <p style=\"font-size: 14px; white-space: normal;\r\n line-height: normal;\">\r\n No postman collection configured. \r\n Add Postman collection Id and Api key\r\n </p>\r\n \r\n </mat-toolbar>\r\n \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BAAyB,EAAC,CAAC,0BClBtF,4jCAuCA,EAAA,MAAA,EAAA,CAAA,4LAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDtBY,2BAA2B,EAAC,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,sBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,gBAAgB,6mBAAC,YAAY,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAKxD,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBARrC,SAAS;+BACE,yBAAyB,EAAA,UAAA,EACvB,IAAI,EACP,OAAA,EAAA,CAAC,2BAA2B,EAAC,gBAAgB,EAAC,YAAY,CAAC,aACxD,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,yBAA0B,EAAC,CAAC,EAAA,QAAA,EAAA,4jCAAA,EAAA,MAAA,EAAA,CAAA,4LAAA,CAAA,EAAA;;0BAYrE;;0BAAY;kEAHV,EAAE,EAAA,CAAA;sBAAhB;gBAiDM,uBAAuB,EAAA,CAAA;sBAA/B;gBACQ,mBAAmB,EAAA,CAAA;sBAA3B;gBAGG,KAAK,EAAA,CAAA;sBADR;gBASU,MAAM,EAAA,CAAA;sBAAd;gBACO,YAAY,EAAA,CAAA;sBAArB;;;;;"}
1
+ {"version":3,"file":"ngx-t-forms-rest-api-call-setup.component-HDQwuGiu.mjs","sources":["../../../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":["import { IFolderItem, IGetPostmanCollections } from 'ngx-t-forms-types';\r\n\r\n// Update the filter function signature\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\r\n return items.filter(collection => {\r\n return searchInItems(collection.item, searchText);\r\n })\r\n \r\n}\r\n\r\nexport function searchInItems(\r\n items: IFolderItem[], \r\n searchText: string\r\n): boolean {\r\n if (!items) return false;\r\n\r\n for (const item of items) {\r\n // Check if current item matches search\r\n if (item.name?.toLowerCase().includes(searchText) || \r\n item.description?.toLowerCase().includes(searchText)) {\r\n return true;\r\n }\r\n\r\n // Recursively search in nested items\r\n if (item.item && searchInItems(item.item, searchText)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n}","export function methodColor(method: string): string {\r\n switch (method) {\r\n case 'GET':\r\n return 'green';\r\n case 'POST':\r\n return 'chocolate';\r\n case 'PUT':\r\n return 'yellow'; \r\n case 'DELETE':\r\n return 'red';\r\n default:\r\n return 'currentColor';\r\n }\r\n }","import { CommonModule } from '@angular/common';\r\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { TreeComponent } from '../api-value-access-rules/functions/convertDataToTree';\r\nimport { IFolderItem, IGetPostmanCollections, IPostmanCollectionConfig } from \"ngx-t-forms-types\";\r\n\r\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\r\nimport { BehaviorSubject, catchError, Observable, take, tap, throwError } from 'rxjs';\r\nimport { convertPostmanFolderItemsToTree } from './functions/convertPostmanCollectionToTree';\r\nimport { filterCollectionItems } from './functions/filterCollectionItems';\r\nimport { methodColor } from './functions/methodColors';\r\n\r\n@Component({\r\n selector: 'app-postman-collections',\r\n templateUrl: './postman-collections.component.html',\r\n styleUrls: ['./postman-collections.component.scss'],\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule, FormsModule]\r\n})\r\nexport class PostmanCollectionsComponent implements OnInit {\r\n\r\n private _collection$: BehaviorSubject<IGetPostmanCollections | undefined> = new BehaviorSubject<IGetPostmanCollections | undefined>(undefined)\r\n get collection$(): Observable<IGetPostmanCollections | undefined> {\r\n return this._collection$.asObservable();\r\n }\r\n treeComponent = new TreeComponent();\r\n\r\n\r\n @Output() nodeSelectionChanged = new EventEmitter<IFolderItem>();\r\n\r\n constructor(private readonly httpClient: HttpClient) { }\r\n ngOnInit(): void {\r\n this.initializePostmanService()\r\n }\r\n _searchKey: string = ''\r\n\r\n @Input() postmanCollectionConfig: IPostmanCollectionConfig | undefined\r\n @Input() loadingEndPoints:string[] = []\r\n \r\n selectNode(node: IFolderItem): void {\r\n this.nodeSelectionChanged.emit(node);\r\n }\r\n\r\n private isValidConfig(config: IPostmanCollectionConfig | undefined): boolean {\r\n return Boolean(config?.collectionUrl && config?.collectionKey);\r\n }\r\n\r\n\r\n error: HttpErrorResponse | undefined\r\n loading: boolean = false\r\n private initializePostmanService(): void {\r\n const isValidConfig = this.isValidConfig(this.postmanCollectionConfig)\r\n if (!isValidConfig) {\r\n this.error = new HttpErrorResponse({\r\n error: 'Invalid Postman Collection Config',\r\n })\r\n return\r\n }\r\n const { collectionUrl, collectionKey } = this.postmanCollectionConfig!\r\n \r\n const requestOptions = {\r\n params: {\r\n apikey: collectionKey,\r\n clearSystemHeaders: true\r\n },\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n\r\n }\r\n }\r\n this.loading = true\r\n this.httpClient.get<IGetPostmanCollections>(\r\n collectionUrl,\r\n requestOptions\r\n ).pipe(\r\n take(1),\r\n tap((data) => {\r\n this._collection$.next(data)\r\n // To ensure the data can be shown as a tree\r\n const treeData = convertPostmanFolderItemsToTree(data.collection.item);\r\n this.treeComponent.assignDataSourceData(treeData)\r\n this.error = undefined\r\n this.loading = false\r\n }),\r\n catchError((err: HttpErrorResponse) => {\r\n this.loading = false\r\n this.error = err\r\n console.error(err)\r\n return throwError(err)\r\n })\r\n ).subscribe();\r\n }\r\n methodColor(method: string): string {\r\n return methodColor(method)\r\n }\r\n searchTree(event: any): void {\r\n const search: string = event.target.value\r\n this.collection$.pipe(\r\n take(1),\r\n tap((collection) => {\r\n if (!collection) {\r\n return\r\n }\r\n const items = filterCollectionItems(collection, search)\r\n const treeData = convertPostmanFolderItemsToTree(items);\r\n this.treeComponent.assignDataSourceData(treeData)\r\n\r\n\r\n })\r\n ).subscribe()\r\n }\r\n getNodeLines(level: number): number[] {\r\n return Array(level).fill(0).map((_, i) => i + 1)\r\n }\r\n}\r\n","\n@if (!!loading ) {\n<div class=\"loadingContainer\">\n <mat-spinner></mat-spinner>\n</div>\n\n}\n@if(!loading){\n <mat-toolbar class=\"search-container\">\n <mat-icon>\n search\n </mat-icon>\n <input type=\"search\" \n placeholder=\"Search api\" \n class=\"search-field\"\n (input)=\"searchTree($event)\"> \n </mat-toolbar>\n <mat-divider ></mat-divider>\n <ng-container *ngIf=\"treeComponent as tree\">\n <mat-tree [dataSource]=\"tree.dataSource\" [treeControl]=\" tree.treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n @if (loadingEndPoints.includes(node.value.id)) {\n <mat-spinner diameter=\"22\" class=\"loading-spinner\" >\n \n </mat-spinner>\n }\n <div class=\"line\" *ngFor=\"let line of getNodeLines(node.level)\" [style.left]=\"line* 40 +8 + 'px'\"></div>\n <button [disabled]=\"!node.value?.request?.body?.raw && node.value.request.method ==='POST' || !node.value?.request?.url?.raw \"\n (click)=\"selectNode(node.value)\" [matTooltip]=\"node.value?.request?.url?.raw || 'Invalid Postman config,missing Endpoint URL'\" class=\"item\" mat-button\n *ngIf=\"node.value?.request\">\n \n <span class=\"node-key method\" [style.color]=\" methodColor(node.value.request.method)\">\n <!-- -->\n\n {{node.value.request.method}}</span>\n <span>\n \n {{ node.key }} \n \n </span>\n </button>\n \n </mat-tree-node>\n \n <mat-tree-node *matTreeNodeDef=\"let node; when: tree.hasChild\" matTreeNodePadding>\n <button style=\"padding: 0px; \n \" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'Toggle ' + node.key\">\n <mat-icon>\n \n {{tree.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n \n </button>\n \n <mat-icon style=\"color: var(--ion-color-medium)\">\n {{tree.treeControl.isExpanded(node) ? 'folder_open' : 'folder'}}\n\n </mat-icon>\n <span style=\"margin-left: 8px;font-weight:500\">\n \n {{ node.key }}\n </span>\n \n </mat-tree-node>\n </mat-tree>\n \n </ng-container>\n <ng-container *ngIf=\"error\">\n <mat-toolbar>\n <span style=\"color: red ;font-size:14px; line-height: normal;\n text-wrap: auto;\">\n {{error.message}}\n </span>\n </mat-toolbar>\n </ng-container>\n}\n","import { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\nimport { PostmanCollectionsComponent } from '../postman-collections/postman-collections.component';\r\nimport { IFolderItem, IPostmanCollectionConfig } from \"ngx-t-forms-types\";\r\nimport { APIDataFetchingConfigurationInterface } from 'ngx-t-forms-types';\r\nimport { DataSources } from \"ngx-t-forms-types\";\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { methodColor } from '../postman-collections/functions/methodColors';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { NgControl } from '@angular/forms';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\n@Component({\r\n selector: 'lib-rest-api-call-setup',\r\n standalone: true,\r\n imports: [PostmanCollectionsComponent,MatModulesModule,CommonModule],\r\n providers: [{ provide: MatFormFieldControl, useExisting:RestApiCallSetupComponent}],\r\n templateUrl: './rest-api-call-setup.component.html',\r\n styleUrl: './rest-api-call-setup.component.css'\r\n})\r\nexport class RestApiCallSetupComponent implements MatFormFieldControl<APIDataFetchingConfigurationInterface | undefined> {\r\n \r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n \r\n @HostBinding() id = `lib-rest-api-call-setup-${RestApiCallSetupComponent.nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\n disabled: boolean = false;\r\n get errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n \r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.lib-rest-api-call-setup');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n }\r\n onContainerClick(event: MouseEvent): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n \r\n touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n \r\n \r\n \r\n @Input() postmanCollectionConfig: IPostmanCollectionConfig | undefined\r\n @Input() httpGetDataFunction: ((url: string,options:any) => Observable<any>) | undefined = undefined\r\n private _value: APIDataFetchingConfigurationInterface | undefined;\r\n @Input() \r\n set value(val: APIDataFetchingConfigurationInterface | undefined) {\r\n if (JSON.stringify(val) !== JSON.stringify(this._value)) {\r\n this._value = val;\r\n }\r\n }\r\n get value(): APIDataFetchingConfigurationInterface | undefined {\r\n return this._value;\r\n }\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n @Output() valueChanged = new EventEmitter<APIDataFetchingConfigurationInterface | undefined >();\r\n loadingEndPoints: string[] = []\r\n async nodeSelectionChanged(node: IFolderItem) {\r\n\r\n const { id, name, request, response } = node;\r\n \r\n if(!request || !response) return;\r\n let requestBody\r\n try {\r\n requestBody = JSON.parse(request?.body?.raw || '{}')\r\n } catch (error) {\r\n console.error(\"API BODY PARSE ERROR\")\r\n requestBody = {}\r\n }\r\n \r\n \r\n\r\n \r\n const keyExtraction = (key: string, value: any, primaryKey: boolean) => {\r\n return ({\r\n name: key,\r\n type: typeof value,\r\n primaryKey\r\n }) as any\r\n }\r\n\r\n // if(request.method === 'GET'){\r\n // this.loadingEndPoints.push(id)\r\n // try {\r\n // responseBody = await this.httpGetDataFunction?.(request.url.raw)\r\n // } catch (error) {\r\n // console.error(error)\r\n // this.loadingEndPoints = this.loadingEndPoints.filter((item) => item !== id)\r\n // }\r\n\r\n // }\r\n \r\n const secondaryKeys = Object.entries(requestBody['data'] || {}).map(([key, value]) => keyExtraction(key, value, false))\r\n delete requestBody['data']\r\n\r\n const primaryKeys = Object.entries(requestBody).map(([key, value]) => keyExtraction(key, value, true))\r\n const minimumInputRequired: any = request?.method === 'POST' ? [...primaryKeys, ...secondaryKeys] : []\r\n const transformedNode= {\r\n _id: id,\r\n name: name,\r\n httpEndPoint: request.url.raw,\r\n httpMethod: request.method,\r\n source: DataSources.Api,\r\n postFormData: request.method === 'POST',\r\n backEndConfig: {\r\n minimumInputRequired,\r\n },\r\n \r\n } as APIDataFetchingConfigurationInterface \r\n const fetch: any = transformedNode;\r\n console.log(fetch)\r\n this.valueChanged.emit(fetch);\r\n }\r\n clearValue() {\r\n const source = this.value?.source as any\r\n this._value = undefined;\r\n this.valueChanged.emit(undefined);\r\n this.valueChanged.emit({source:source} as any);\r\n }\r\n methodColor(method: string| undefined): string {\r\n return methodColor(method||'POST')\r\n }\r\n get hasValidValue(){\r\n return Boolean(this.value) && Boolean(this.value?.httpEndPoint) && Boolean(this.value?.httpMethod) \r\n }\r\n \r\n}\r\n","\r\n@if(postmanCollectionConfig && !hasValidValue ){\r\n <app-postman-collections \r\n (nodeSelectionChanged)=\"nodeSelectionChanged($event)\"\r\n [loadingEndPoints]=\"loadingEndPoints\"\r\n [postmanCollectionConfig]=\"postmanCollectionConfig\" >\r\n \r\n </app-postman-collections>\r\n}\r\n\r\n@if(!!hasValidValue && !!postmanCollectionConfig){\r\n<mat-toolbar>\r\n \r\n <button \r\n (click)=\"clearValue()\" [matTooltip]=\"value?.httpEndPoint\" class=\"item\" mat-flat-button\r\n >\r\n\r\n <span class=\"node-key method\" [style.color]=\" methodColor(value?.httpMethod)\">\r\n {{value?.httpMethod}}</span>\r\n <span>\r\n {{ value?.name }} \r\n\r\n </span>\r\n </button> \r\n</mat-toolbar>\r\n\r\n}\r\n\r\n@if(!postmanCollectionConfig) {\r\n <mat-toolbar color=\"warn\">\r\n <p style=\"font-size: 14px; white-space: normal;\r\n line-height: normal;\">\r\n No postman collection configured. \r\n Add Postman collection Id and Api key\r\n </p>\r\n \r\n </mat-toolbar>\r\n \r\n}\r\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA;AACgB,SAAA,qBAAqB,CACjC,WAAmC,EACnC,SAAiB,EAAA;AAEjB,IAAA,MAAM,KAAK,GAAG,WAAW,CAAC,UAAU,CAAC,IAAI;IACzC,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE;IACjD,IAAI,CAAC,UAAU,EAAE;AACb,QAAA,OAAO,KAAK;;AAGhB,IAAA,OAAO,KAAK,CAAC,MAAM,CAAC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AAY,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAKxD,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBARrC,SAAS;+BACE,yBAAyB,EAAA,UAAA,EACvB,IAAI,EACP,OAAA,EAAA,CAAC,2BAA2B,EAAC,gBAAgB,EAAC,YAAY,CAAC,aACxD,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,yBAA0B,EAAC,CAAC,EAAA,QAAA,EAAA,4jCAAA,EAAA,MAAA,EAAA,CAAA,4LAAA,CAAA,EAAA;;0BAYrE;;0BAAY;kEAHV,EAAE,EAAA,CAAA;sBAAhB;gBAiDM,uBAAuB,EAAA,CAAA;sBAA/B;gBACQ,mBAAmB,EAAA,CAAA;sBAA3B;gBAGG,KAAK,EAAA,CAAA;sBADR;gBASU,MAAM,EAAA,CAAA;sBAAd;gBACO,YAAY,EAAA,CAAA;sBAArB;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, computed, ViewChild, Input, Component } from '@angular/core';
3
- import { F as FormsStoreService, M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-C6wZyKbR.mjs';
3
+ import { F as FormsStoreService, M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-DOtego0e.mjs';
4
4
  import * as i4$1 from '@angular/material/sort';
5
5
  import { MatSort } from '@angular/material/sort';
6
6
  import { MatPaginator } from '@angular/material/paginator';
@@ -136,10 +136,10 @@ class SectionReportComponent {
136
136
  const filterValue = event.target.value;
137
137
  this.dataSource.filter = filterValue.trim().toLowerCase();
138
138
  }
139
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SectionReportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
140
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: SectionReportComponent, isStandalone: true, selector: "app-section-report", inputs: { sectionId: "sectionId" }, viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "<div class=\"report-container\" *ngIf=\"(section())\">\r\n\r\n\r\n <mat-toolbar style=\"padding: 0px;\">\r\n <mat-icon class=\"section-icon\">analytics</mat-icon>\r\n <small>\r\n Form Section Diagnostic Report\r\n </small>\r\n\r\n <span class=\"spacer\"></span>\r\n <div class=\"status-chips\">\r\n <div class=\"status-chip\" >\r\n <mat-icon>check_circle</mat-icon>\r\n \r\n </div>\r\n <div class=\"status-chip initialized\" *ngIf=\"(section())?.sectionIsSeen\">\r\n <mat-icon>task_alt</mat-icon>\r\n Initialized\r\n </div>\r\n </div>\r\n </mat-toolbar>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n <table mat-table [dataSource]=\"(sectionData())||[]\" matSort class=\"w-full\">\r\n <!-- Icon Column -->\r\n <ng-container matColumnDef=\"icon\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-icon [ngStyle]=\"{'color': row.color}\">{{ row.icon }}</mat-icon>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- description Column -->\r\n <ng-container matColumnDef=\"description\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>description</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.description }}</td>\r\n </ng-container>\r\n\r\n <!-- Name Column -->\r\n <ng-container matColumnDef=\"name\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Type</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.name }}</td>\r\n </ng-container>\r\n\r\n <!-- Value Column -->\r\n <ng-container matColumnDef=\"value\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Value</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.value }}</td>\r\n </ng-container>\r\n\r\n <!-- Details Column -->\r\n <ng-container matColumnDef=\"details\">\r\n <th mat-header-cell *matHeaderCellDef>Details</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-chip-set *ngIf=\"row.details?.length\">\r\n <mat-chip *ngFor=\"let detail of row.details\" class=\"detail-chip\">\r\n {{ detail }}\r\n </mat-chip>\r\n </mat-chip-set>\r\n </td>\r\n </ng-container>\r\n\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n </table>\r\n</div>", styles: [".report-container{padding:20px;display:flex;flex-direction:column;gap:20px;background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))}.header-card{background:#fff}.title-section{display:flex;align-items:center;gap:12px}.section-icon{color:#4f46e5;font-size:28px;width:28px;height:28px;margin-right:8px}h1{margin:0;font-size:20px;font-weight:500}.subtitle{margin:4px 0 0;color:#666;font-size:14px}.status-chips{display:flex;gap:8px;margin-left:auto}.status-chip{display:flex;align-items:center;gap:4px;padding:4px 12px;border-radius:16px;background:#22c55e;color:#fff;font-size:14px}.status-chip.invalid{background:#ef4444}.status-chip.initialized{background:#3b82f6}.status-chip mat-icon{font-size:18px;width:18px;height:18px}.filter-field{width:100%;margin-bottom:16px}.detail-chip{font-size:12px;height:24px}mat-card-content{padding:16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i4.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i4.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$1.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }] }); }
139
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SectionReportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
140
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: SectionReportComponent, isStandalone: true, selector: "app-section-report", inputs: { sectionId: "sectionId" }, viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "<div class=\"report-container\" *ngIf=\"(section())\">\r\n\r\n\r\n <mat-toolbar style=\"padding: 0px;\">\r\n <mat-icon class=\"section-icon\">analytics</mat-icon>\r\n <small>\r\n Form Section Diagnostic Report\r\n </small>\r\n\r\n <span class=\"spacer\"></span>\r\n <div class=\"status-chips\">\r\n <div class=\"status-chip\" >\r\n <mat-icon>check_circle</mat-icon>\r\n \r\n </div>\r\n <div class=\"status-chip initialized\" *ngIf=\"(section())?.sectionIsSeen\">\r\n <mat-icon>task_alt</mat-icon>\r\n Initialized\r\n </div>\r\n </div>\r\n </mat-toolbar>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n <table mat-table [dataSource]=\"(sectionData())||[]\" matSort class=\"w-full\">\r\n <!-- Icon Column -->\r\n <ng-container matColumnDef=\"icon\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-icon [ngStyle]=\"{'color': row.color}\">{{ row.icon }}</mat-icon>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- description Column -->\r\n <ng-container matColumnDef=\"description\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>description</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.description }}</td>\r\n </ng-container>\r\n\r\n <!-- Name Column -->\r\n <ng-container matColumnDef=\"name\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Type</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.name }}</td>\r\n </ng-container>\r\n\r\n <!-- Value Column -->\r\n <ng-container matColumnDef=\"value\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Value</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.value }}</td>\r\n </ng-container>\r\n\r\n <!-- Details Column -->\r\n <ng-container matColumnDef=\"details\">\r\n <th mat-header-cell *matHeaderCellDef>Details</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-chip-set *ngIf=\"row.details?.length\">\r\n <mat-chip *ngFor=\"let detail of row.details\" class=\"detail-chip\">\r\n {{ detail }}\r\n </mat-chip>\r\n </mat-chip-set>\r\n </td>\r\n </ng-container>\r\n\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n </table>\r\n</div>", styles: [".report-container{padding:20px;display:flex;flex-direction:column;gap:20px;background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))}.header-card{background:#fff}.title-section{display:flex;align-items:center;gap:12px}.section-icon{color:#4f46e5;font-size:28px;width:28px;height:28px;margin-right:8px}h1{margin:0;font-size:20px;font-weight:500}.subtitle{margin:4px 0 0;color:#666;font-size:14px}.status-chips{display:flex;gap:8px;margin-left:auto}.status-chip{display:flex;align-items:center;gap:4px;padding:4px 12px;border-radius:16px;background:#22c55e;color:#fff;font-size:14px}.status-chip.invalid{background:#ef4444}.status-chip.initialized{background:#3b82f6}.status-chip mat-icon{font-size:18px;width:18px;height:18px}.filter-field{width:100%;margin-bottom:16px}.detail-chip{font-size:12px;height:24px}mat-card-content{padding:16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i4.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i4.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$1.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }] }); }
141
141
  }
142
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SectionReportComponent, decorators: [{
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SectionReportComponent, decorators: [{
143
143
  type: Component,
144
144
  args: [{ selector: 'app-section-report', standalone: true, imports: [CommonModule, MatModulesModule], template: "<div class=\"report-container\" *ngIf=\"(section())\">\r\n\r\n\r\n <mat-toolbar style=\"padding: 0px;\">\r\n <mat-icon class=\"section-icon\">analytics</mat-icon>\r\n <small>\r\n Form Section Diagnostic Report\r\n </small>\r\n\r\n <span class=\"spacer\"></span>\r\n <div class=\"status-chips\">\r\n <div class=\"status-chip\" >\r\n <mat-icon>check_circle</mat-icon>\r\n \r\n </div>\r\n <div class=\"status-chip initialized\" *ngIf=\"(section())?.sectionIsSeen\">\r\n <mat-icon>task_alt</mat-icon>\r\n Initialized\r\n </div>\r\n </div>\r\n </mat-toolbar>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n <table mat-table [dataSource]=\"(sectionData())||[]\" matSort class=\"w-full\">\r\n <!-- Icon Column -->\r\n <ng-container matColumnDef=\"icon\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-icon [ngStyle]=\"{'color': row.color}\">{{ row.icon }}</mat-icon>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- description Column -->\r\n <ng-container matColumnDef=\"description\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>description</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.description }}</td>\r\n </ng-container>\r\n\r\n <!-- Name Column -->\r\n <ng-container matColumnDef=\"name\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Type</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.name }}</td>\r\n </ng-container>\r\n\r\n <!-- Value Column -->\r\n <ng-container matColumnDef=\"value\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Value</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.value }}</td>\r\n </ng-container>\r\n\r\n <!-- Details Column -->\r\n <ng-container matColumnDef=\"details\">\r\n <th mat-header-cell *matHeaderCellDef>Details</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-chip-set *ngIf=\"row.details?.length\">\r\n <mat-chip *ngFor=\"let detail of row.details\" class=\"detail-chip\">\r\n {{ detail }}\r\n </mat-chip>\r\n </mat-chip-set>\r\n </td>\r\n </ng-container>\r\n\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n </table>\r\n</div>", styles: [".report-container{padding:20px;display:flex;flex-direction:column;gap:20px;background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))}.header-card{background:#fff}.title-section{display:flex;align-items:center;gap:12px}.section-icon{color:#4f46e5;font-size:28px;width:28px;height:28px;margin-right:8px}h1{margin:0;font-size:20px;font-weight:500}.subtitle{margin:4px 0 0;color:#666;font-size:14px}.status-chips{display:flex;gap:8px;margin-left:auto}.status-chip{display:flex;align-items:center;gap:4px;padding:4px 12px;border-radius:16px;background:#22c55e;color:#fff;font-size:14px}.status-chip.invalid{background:#ef4444}.status-chip.initialized{background:#3b82f6}.status-chip mat-icon{font-size:18px;width:18px;height:18px}.filter-field{width:100%;margin-bottom:16px}.detail-chip{font-size:12px;height:24px}mat-card-content{padding:16px}\n"] }]
145
145
  }], ctorParameters: () => [], propDecorators: { sectionId: [{
@@ -153,4 +153,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
153
153
  }] } });
154
154
 
155
155
  export { SectionReportComponent };
156
- //# sourceMappingURL=ngx-t-forms-section-report.component-DB_5Jx3j.mjs.map
156
+ //# sourceMappingURL=ngx-t-forms-section-report.component-C92mqFtY.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-t-forms-section-report.component-DB_5Jx3j.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/section-report/section-report.component.ts","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/section-report/section-report.component.html"],"sourcesContent":["import { Component, computed, inject, Input, ViewChild } from '@angular/core';\r\n\r\n\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { MatPaginator } from '@angular/material/paginator';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsStoreService } from '../../../forms/store/forms-store.service';\r\n\r\n\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\nimport { ElementTypes, FormSlideInterface, validateFormSlide } from 'ngx-t-forms-types';\r\n@Component({\r\n selector: 'app-section-report',\r\n standalone: true,\r\n imports: [CommonModule,MatModulesModule],\r\n templateUrl: './section-report.component.html',\r\n styleUrl: './section-report.component.scss'\r\n})\r\nexport class SectionReportComponent {\r\n @Input() sectionId: string = '';\r\n @ViewChild(MatSort) sort!: MatSort;\r\n @ViewChild(MatPaginator) paginator!: MatPaginator;\r\n\r\n displayedColumns: string[] = ['icon', 'name','description', 'value'];\r\n dataSource = new MatTableDataSource<any>();\r\n\r\n private store:FormsStoreService = inject(FormsStoreService)\r\n selectFormInEdit$ = this.store.selectors.selectFormInEdit$\r\n selectFormInEdit = toSignal(this.selectFormInEdit$)\r\n constructor() {}\r\n\r\n ngOnInit() {\r\n\r\n }\r\n \r\n\r\n section = computed(()=>\r\n {\r\n const form = this.selectFormInEdit()\r\n return form?.form.slides.find((slide: FormSlideInterface) => slide.sectionId === this.sectionId) || null\r\n })\r\n \r\n sectionData = computed(()=> {\r\n const section = this.section()\r\n return this.updateTableData(section)\r\n })\r\n\r\n updateTableData(data: FormSlideInterface|null) {\r\n if(!data) return [];\r\n const allInputs = data.columns.flatMap(column=>column.element ===ElementTypes.MultipleInput ? [...(column?.formInputs||[]),column]: [column]).filter(\r\n (input) => input.sectionId === this.sectionId\r\n )\r\n const calculatedInputs = allInputs.filter((input) => input.calculatedFieldRules?.formula && input.calculatedFieldRules?.formula !== '');\r\n const inputsWithManualValidations = allInputs.filter((input) => input.validators?.some((validator) => Object.keys(validator).length > 0));\r\n const allSectionInputConfigErrors = validateFormSlide(data);\r\n \r\n const metrics: any[] = [\r\n {\r\n icon: 'input',\r\n name: 'Total Inputs',\r\n value: Object.keys(allInputs|| {}).length,\r\n color: '#2196f3',\r\n description: 'Total number of form inputs in section',\r\n trend: 'stable',\r\n category: 'inputs'\r\n },\r\n {\r\n icon: 'calculate',\r\n name: 'Calculated Fields',\r\n value: calculatedInputs.length,\r\n details:calculatedInputs,\r\n color: '#4caf50',\r\n description: 'Fields with calculation formulas',\r\n trend: 'monitoring',\r\n category: 'calculations'\r\n },\r\n {\r\n icon: 'rule',\r\n name: 'Manual Validations',\r\n value: inputsWithManualValidations.length,\r\n details: inputsWithManualValidations,\r\n color: '#ff9800',\r\n description: 'Fields with custom validation rules',\r\n trend: 'warning',\r\n category: 'validation'\r\n },\r\n \r\n {\r\n icon: 'bug_report',\r\n name: 'Config Errors',\r\n value: allSectionInputConfigErrors.length,\r\n color: '#f44336',\r\n description: 'Configuration errors detected',\r\n trend: 'critical',\r\n category: 'errors'\r\n },\r\n // {\r\n // icon: 'api',\r\n // name: 'GET Methods',\r\n // value: data.getMethodInputs.length,\r\n // details: data.getMethodInputs,\r\n // color: '#2196f3',\r\n // description: 'Fields using GET API calls',\r\n // trend: 'stable',\r\n // category: 'api'\r\n // },\r\n // {\r\n // icon: 'sync',\r\n // name: 'POST Methods',\r\n // value: data.postMethodInputs.length,\r\n // details: data.postMethodInputs,\r\n // color: '#673ab7',\r\n // description: 'Fields using POST API calls',\r\n // trend: 'monitoring',\r\n // category: 'api'\r\n // },\r\n // {\r\n // icon: 'visibility',\r\n // name: 'Hidden Fields',\r\n // value: Object.values(data.sectionInputs || {})\r\n // .filter((input: TInputControllerService) => input.input.readonly).length,\r\n // color: '#9e9e9e',\r\n // description: 'Number of hidden/conditional fields',\r\n // trend: 'neutral',\r\n // category: 'visibility'\r\n // },\r\n // {\r\n // icon: 'multiple_stop',\r\n // name: 'Multiple Inputs',\r\n // value: Object.values(data.sectionInputs || {})\r\n // .filter((input: TInputControllerService) => input.input.element ===ElementTypes.MultipleInput).length,\r\n // color: '#795548',\r\n // description: 'Fields allowing multiple values',\r\n // trend: 'stable',\r\n // category: 'inputs'\r\n // },\r\n // {\r\n // icon: 'error_outline',\r\n // name: 'Required Fields',\r\n // value: Object.values(data.sectionInputs || {})\r\n // .filter((input: TInputControllerService) => input.input.required).length,\r\n // color: '#e91e63',\r\n // description: 'Mandatory input fields',\r\n // trend: 'warning',\r\n // category: 'validation'\r\n // }\r\n ];\r\n \r\n return metrics;\r\n }\r\n\r\n applyFilter(event: Event) {\r\n const filterValue = (event.target as HTMLInputElement).value;\r\n this.dataSource.filter = filterValue.trim().toLowerCase();\r\n }\r\n}","<div class=\"report-container\" *ngIf=\"(section())\">\r\n\r\n\r\n <mat-toolbar style=\"padding: 0px;\">\r\n <mat-icon class=\"section-icon\">analytics</mat-icon>\r\n <small>\r\n Form Section Diagnostic Report\r\n </small>\r\n\r\n <span class=\"spacer\"></span>\r\n <div class=\"status-chips\">\r\n <div class=\"status-chip\" >\r\n <mat-icon>check_circle</mat-icon>\r\n \r\n </div>\r\n <div class=\"status-chip initialized\" *ngIf=\"(section())?.sectionIsSeen\">\r\n <mat-icon>task_alt</mat-icon>\r\n Initialized\r\n </div>\r\n </div>\r\n </mat-toolbar>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n <table mat-table [dataSource]=\"(sectionData())||[]\" matSort class=\"w-full\">\r\n <!-- Icon Column -->\r\n <ng-container matColumnDef=\"icon\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-icon [ngStyle]=\"{'color': row.color}\">{{ row.icon }}</mat-icon>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- description Column -->\r\n <ng-container matColumnDef=\"description\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>description</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.description }}</td>\r\n </ng-container>\r\n\r\n <!-- Name Column -->\r\n <ng-container matColumnDef=\"name\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Type</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.name }}</td>\r\n </ng-container>\r\n\r\n <!-- Value Column -->\r\n <ng-container matColumnDef=\"value\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Value</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.value }}</td>\r\n </ng-container>\r\n\r\n <!-- Details Column -->\r\n <ng-container matColumnDef=\"details\">\r\n <th mat-header-cell *matHeaderCellDef>Details</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-chip-set *ngIf=\"row.details?.length\">\r\n <mat-chip *ngFor=\"let detail of row.details\" class=\"detail-chip\">\r\n {{ detail }}\r\n </mat-chip>\r\n </mat-chip-set>\r\n </td>\r\n </ng-container>\r\n\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n </table>\r\n</div>"],"names":["i1","i2","i3","i4","i6"],"mappings":";;;;;;;;;;;;;;;;MAoBa,sBAAsB,CAAA;AAWjC,IAAA,WAAA,GAAA;QAVS,IAAS,CAAA,SAAA,GAAW,EAAE;QAI/B,IAAgB,CAAA,gBAAA,GAAa,CAAC,MAAM,EAAE,MAAM,EAAC,aAAa,EAAE,OAAO,CAAC;AACpE,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,kBAAkB,EAAO;AAElC,QAAA,IAAA,CAAA,KAAK,GAAqB,MAAM,CAAC,iBAAiB,CAAC;QAC3D,IAAiB,CAAA,iBAAA,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB;AAC1D,QAAA,IAAA,CAAA,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC;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AAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAI5B,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAPlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,cAClB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAC,gBAAgB,CAAC,EAAA,QAAA,EAAA,22EAAA,EAAA,MAAA,EAAA,CAAA,k2BAAA,CAAA,EAAA;wDAK/B,SAAS,EAAA,CAAA;sBAAjB;gBACmB,IAAI,EAAA,CAAA;sBAAvB,SAAS;uBAAC,OAAO;gBACO,SAAS,EAAA,CAAA;sBAAjC,SAAS;uBAAC,YAAY;;;;;"}
1
+ {"version":3,"file":"ngx-t-forms-section-report.component-C92mqFtY.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/section-report/section-report.component.ts","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/section-report/section-report.component.html"],"sourcesContent":["import { Component, computed, inject, Input, ViewChild } from '@angular/core';\r\n\r\n\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { MatPaginator } from '@angular/material/paginator';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsStoreService } from '../../../forms/store/forms-store.service';\r\n\r\n\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\nimport { ElementTypes, FormSlideInterface, validateFormSlide } from 'ngx-t-forms-types';\r\n@Component({\r\n selector: 'app-section-report',\r\n standalone: true,\r\n imports: [CommonModule,MatModulesModule],\r\n templateUrl: './section-report.component.html',\r\n styleUrl: './section-report.component.scss'\r\n})\r\nexport class SectionReportComponent {\r\n @Input() sectionId: string = '';\r\n @ViewChild(MatSort) sort!: MatSort;\r\n @ViewChild(MatPaginator) paginator!: MatPaginator;\r\n\r\n displayedColumns: string[] = ['icon', 'name','description', 'value'];\r\n dataSource = new MatTableDataSource<any>();\r\n\r\n private store:FormsStoreService = inject(FormsStoreService)\r\n selectFormInEdit$ = this.store.selectors.selectFormInEdit$\r\n selectFormInEdit = toSignal(this.selectFormInEdit$)\r\n constructor() {}\r\n\r\n ngOnInit() {\r\n\r\n }\r\n \r\n\r\n section = computed(()=>\r\n {\r\n const form = this.selectFormInEdit()\r\n return form?.form.slides.find((slide: FormSlideInterface) => slide.sectionId === this.sectionId) || null\r\n })\r\n \r\n sectionData = computed(()=> {\r\n const section = this.section()\r\n return this.updateTableData(section)\r\n })\r\n\r\n updateTableData(data: FormSlideInterface|null) {\r\n if(!data) return [];\r\n const allInputs = data.columns.flatMap(column=>column.element ===ElementTypes.MultipleInput ? [...(column?.formInputs||[]),column]: [column]).filter(\r\n (input) => input.sectionId === this.sectionId\r\n )\r\n const calculatedInputs = allInputs.filter((input) => input.calculatedFieldRules?.formula && input.calculatedFieldRules?.formula !== '');\r\n const inputsWithManualValidations = allInputs.filter((input) => input.validators?.some((validator) => Object.keys(validator).length > 0));\r\n const allSectionInputConfigErrors = validateFormSlide(data);\r\n \r\n const metrics: any[] = [\r\n {\r\n icon: 'input',\r\n name: 'Total Inputs',\r\n value: Object.keys(allInputs|| {}).length,\r\n color: '#2196f3',\r\n description: 'Total number of form inputs in section',\r\n trend: 'stable',\r\n category: 'inputs'\r\n },\r\n {\r\n icon: 'calculate',\r\n name: 'Calculated Fields',\r\n value: calculatedInputs.length,\r\n details:calculatedInputs,\r\n color: '#4caf50',\r\n description: 'Fields with calculation formulas',\r\n trend: 'monitoring',\r\n category: 'calculations'\r\n },\r\n {\r\n icon: 'rule',\r\n name: 'Manual Validations',\r\n value: inputsWithManualValidations.length,\r\n details: inputsWithManualValidations,\r\n color: '#ff9800',\r\n description: 'Fields with custom validation rules',\r\n trend: 'warning',\r\n category: 'validation'\r\n },\r\n \r\n {\r\n icon: 'bug_report',\r\n name: 'Config Errors',\r\n value: allSectionInputConfigErrors.length,\r\n color: '#f44336',\r\n description: 'Configuration errors detected',\r\n trend: 'critical',\r\n category: 'errors'\r\n },\r\n // {\r\n // icon: 'api',\r\n // name: 'GET Methods',\r\n // value: data.getMethodInputs.length,\r\n // details: data.getMethodInputs,\r\n // color: '#2196f3',\r\n // description: 'Fields using GET API calls',\r\n // trend: 'stable',\r\n // category: 'api'\r\n // },\r\n // {\r\n // icon: 'sync',\r\n // name: 'POST Methods',\r\n // value: data.postMethodInputs.length,\r\n // details: data.postMethodInputs,\r\n // color: '#673ab7',\r\n // description: 'Fields using POST API calls',\r\n // trend: 'monitoring',\r\n // category: 'api'\r\n // },\r\n // {\r\n // icon: 'visibility',\r\n // name: 'Hidden Fields',\r\n // value: Object.values(data.sectionInputs || {})\r\n // .filter((input: TInputControllerService) => input.input.readonly).length,\r\n // color: '#9e9e9e',\r\n // description: 'Number of hidden/conditional fields',\r\n // trend: 'neutral',\r\n // category: 'visibility'\r\n // },\r\n // {\r\n // icon: 'multiple_stop',\r\n // name: 'Multiple Inputs',\r\n // value: Object.values(data.sectionInputs || {})\r\n // .filter((input: TInputControllerService) => input.input.element ===ElementTypes.MultipleInput).length,\r\n // color: '#795548',\r\n // description: 'Fields allowing multiple values',\r\n // trend: 'stable',\r\n // category: 'inputs'\r\n // },\r\n // {\r\n // icon: 'error_outline',\r\n // name: 'Required Fields',\r\n // value: Object.values(data.sectionInputs || {})\r\n // .filter((input: TInputControllerService) => input.input.required).length,\r\n // color: '#e91e63',\r\n // description: 'Mandatory input fields',\r\n // trend: 'warning',\r\n // category: 'validation'\r\n // }\r\n ];\r\n \r\n return metrics;\r\n }\r\n\r\n applyFilter(event: Event) {\r\n const filterValue = (event.target as HTMLInputElement).value;\r\n this.dataSource.filter = filterValue.trim().toLowerCase();\r\n }\r\n}","<div class=\"report-container\" *ngIf=\"(section())\">\r\n\r\n\r\n <mat-toolbar style=\"padding: 0px;\">\r\n <mat-icon class=\"section-icon\">analytics</mat-icon>\r\n <small>\r\n Form Section Diagnostic Report\r\n </small>\r\n\r\n <span class=\"spacer\"></span>\r\n <div class=\"status-chips\">\r\n <div class=\"status-chip\" >\r\n <mat-icon>check_circle</mat-icon>\r\n \r\n </div>\r\n <div class=\"status-chip initialized\" *ngIf=\"(section())?.sectionIsSeen\">\r\n <mat-icon>task_alt</mat-icon>\r\n Initialized\r\n </div>\r\n </div>\r\n </mat-toolbar>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n <table mat-table [dataSource]=\"(sectionData())||[]\" matSort class=\"w-full\">\r\n <!-- Icon Column -->\r\n <ng-container matColumnDef=\"icon\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-icon [ngStyle]=\"{'color': row.color}\">{{ row.icon }}</mat-icon>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- description Column -->\r\n <ng-container matColumnDef=\"description\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>description</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.description }}</td>\r\n </ng-container>\r\n\r\n <!-- Name Column -->\r\n <ng-container matColumnDef=\"name\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Type</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.name }}</td>\r\n </ng-container>\r\n\r\n <!-- Value Column -->\r\n <ng-container matColumnDef=\"value\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Value</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.value }}</td>\r\n </ng-container>\r\n\r\n <!-- Details Column -->\r\n <ng-container matColumnDef=\"details\">\r\n <th mat-header-cell *matHeaderCellDef>Details</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-chip-set *ngIf=\"row.details?.length\">\r\n <mat-chip *ngFor=\"let detail of row.details\" class=\"detail-chip\">\r\n {{ detail }}\r\n </mat-chip>\r\n </mat-chip-set>\r\n </td>\r\n </ng-container>\r\n\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n </table>\r\n</div>"],"names":["i1","i2","i3","i4","i6"],"mappings":";;;;;;;;;;;;;;;;MAoBa,sBAAsB,CAAA;AAWjC,IAAA,WAAA,GAAA;QAVS,IAAS,CAAA,SAAA,GAAW,EAAE;QAI/B,IAAgB,CAAA,gBAAA,GAAa,CAAC,MAAM,EAAE,MAAM,EAAC,aAAa,EAAE,OAAO,CAAC;AACpE,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,kBAAkB,EAAO;AAElC,QAAA,IAAA,CAAA,KAAK,GAAqB,MAAM,CAAC,iBAAiB,CAAC;QAC3D,IAAiB,CAAA,iBAAA,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB;AAC1D,QAAA,IAAA,CAAA,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC;AAQnD,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAI;AAEnB,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,gBAAgB,EAAE;YACpC,OAAO,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAyB,KAAK,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI;AAC1G,SAAC,CAAC;AAEL,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAI;AAC1B,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAC5B,YAAA,OAAQ,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC;AACvC,SAAC,CAAC;;IAdF,QAAQ,GAAA;;AAgBR,IAAA,eAAe,CAAC,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;gBACmB,IAAI,EAAA,CAAA;sBAAvB,SAAS;uBAAC,OAAO;gBACO,SAAS,EAAA,CAAA;sBAAjC,SAAS;uBAAC,YAAY;;;;;"}
@@ -6,14 +6,14 @@ import * as i1 from '@angular/forms';
6
6
  import { FormGroup, FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
7
7
  import { v4 } from 'uuid';
8
8
  import _ from 'lodash';
9
- import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-C6wZyKbR.mjs';
10
- import * as i3$1 from '@angular/material/form-field';
9
+ import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-DOtego0e.mjs';
11
10
  import { MatFormFieldControl } from '@angular/material/form-field';
12
11
  import { Subject } from 'rxjs';
13
12
  import * as i2 from '@angular/material/button';
14
13
  import * as i3 from '@angular/material/card';
15
14
  import * as i4 from '@angular/material/chips';
16
15
  import * as i6 from '@angular/material/icon';
16
+ import * as i3$1 from '@angular/material/select';
17
17
  import * as i9 from '@angular/material/toolbar';
18
18
  import * as i12 from '@angular/material/input';
19
19
 
@@ -119,10 +119,10 @@ class SelectionOptionsEditorComponent {
119
119
  removeObjectById(array, id) {
120
120
  return _.reject(array, { id: id });
121
121
  }
122
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SelectionOptionsEditorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
123
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: SelectionOptionsEditorComponent, isStandalone: true, selector: "app-selection-options-editor", inputs: { errors: "errors", options: "options" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: SelectionOptionsEditorComponent }], ngImport: i0, template: "\r\n <mat-chip-listbox aria-label=\"Fish selection\">\r\n @for (option of options||[]; track option.id) {\r\n <mat-chip-option \r\n (removed)=\"remove(option)\"\r\n (click)=\"this.inEdit?.id === option?.id? this.inEdit = undefined :this.inEdit = option\"\r\n color=\"accent\" \r\n [value]=\"option?.value\"\r\n [selected]=\"this.inEdit?.id === option?.id\">{{option?.label}}\r\n <button matChipRemove [attr.aria-label]=\"'remove ' \">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-option>\r\n }\r\n </mat-chip-listbox>\r\n <mat-toolbar *ngIf=\"!inEdit\">\r\n <button style=\"width:100%\" mat-stroked-button (click)=\"add()\">\r\n Add an option <mat-icon>add</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n <mat-card *ngIf=\"!!inEdit\">\r\n <mat-card-header>\r\n <mat-card-title>Edit Option</mat-card-title>\r\n <mat-card-subtitle>Modify Option Details</mat-card-subtitle>\r\n </mat-card-header>\r\n\r\n <mat-card-content style=\"padding-top:16px ;\" >\r\n \r\n <form *ngIf=\"!!form\" [formGroup]=\"form\">\r\n <mat-form-field >\r\n <mat-label>label</mat-label>\r\n <input type=\"text\" matInput formControlName=\"label\" \r\n placeholder=\"enter option label\">\r\n <mat-hint>Label is required!</mat-hint>\r\n </mat-form-field>\r\n <mat-form-field >\r\n <mat-label>value</mat-label>\r\n <input type=\"text\" matInput formControlName=\"value\" \r\n placeholder=\"enter option value\">\r\n <mat-hint>value is required!</mat-hint>\r\n </mat-form-field>\r\n \r\n </form>\r\n \r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-button (click)=\"closeEdit()\">close</button>\r\n <button mat-button [disabled]=\"form.invalid\" (click)=\"save()\">Save</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n ", styles: ["mat-form-field{width:100%!important;background:azure}\n"], dependencies: [{ kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i3.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i3.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: i3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i4.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i4.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: i4.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i12.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
122
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SelectionOptionsEditorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
123
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: SelectionOptionsEditorComponent, isStandalone: true, selector: "app-selection-options-editor", inputs: { errors: "errors", options: "options" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: SelectionOptionsEditorComponent }], ngImport: i0, template: "\r\n <mat-chip-listbox aria-label=\"Fish selection\">\r\n @for (option of options||[]; track option.id) {\r\n <mat-chip-option \r\n (removed)=\"remove(option)\"\r\n (click)=\"this.inEdit?.id === option?.id? this.inEdit = undefined :this.inEdit = option\"\r\n color=\"accent\" \r\n [value]=\"option?.value\"\r\n [selected]=\"this.inEdit?.id === option?.id\">{{option?.label}}\r\n <button matChipRemove [attr.aria-label]=\"'remove ' \">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-option>\r\n }\r\n </mat-chip-listbox>\r\n <mat-toolbar *ngIf=\"!inEdit\">\r\n <button style=\"width:100%\" mat-stroked-button (click)=\"add()\">\r\n Add an option <mat-icon>add</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n <mat-card *ngIf=\"!!inEdit\">\r\n <mat-card-header>\r\n <mat-card-title>Edit Option</mat-card-title>\r\n <mat-card-subtitle>Modify Option Details</mat-card-subtitle>\r\n </mat-card-header>\r\n\r\n <mat-card-content style=\"padding-top:16px ;\" >\r\n \r\n <form *ngIf=\"!!form\" [formGroup]=\"form\">\r\n <mat-form-field >\r\n <mat-label>label</mat-label>\r\n <input type=\"text\" matInput formControlName=\"label\" \r\n placeholder=\"enter option label\">\r\n <mat-hint>Label is required!</mat-hint>\r\n </mat-form-field>\r\n <mat-form-field >\r\n <mat-label>value</mat-label>\r\n <input type=\"text\" matInput formControlName=\"value\" \r\n placeholder=\"enter option value\">\r\n <mat-hint>value is required!</mat-hint>\r\n </mat-form-field>\r\n \r\n </form>\r\n \r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-button (click)=\"closeEdit()\">close</button>\r\n <button mat-button [disabled]=\"form.invalid\" (click)=\"save()\">Save</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n ", styles: ["mat-form-field{width:100%!important;background:azure}\n"], dependencies: [{ kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i3.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i3.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: i3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i4.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i4.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: i4.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i12.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
124
124
  }
125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SelectionOptionsEditorComponent, decorators: [{
125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SelectionOptionsEditorComponent, decorators: [{
126
126
  type: Component,
127
127
  args: [{ selector: 'app-selection-options-editor', standalone: true, imports: [MatModulesModule, ReactiveFormsModule, CommonModule], providers: [{ provide: MatFormFieldControl, useExisting: SelectionOptionsEditorComponent }], template: "\r\n <mat-chip-listbox aria-label=\"Fish selection\">\r\n @for (option of options||[]; track option.id) {\r\n <mat-chip-option \r\n (removed)=\"remove(option)\"\r\n (click)=\"this.inEdit?.id === option?.id? this.inEdit = undefined :this.inEdit = option\"\r\n color=\"accent\" \r\n [value]=\"option?.value\"\r\n [selected]=\"this.inEdit?.id === option?.id\">{{option?.label}}\r\n <button matChipRemove [attr.aria-label]=\"'remove ' \">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-option>\r\n }\r\n </mat-chip-listbox>\r\n <mat-toolbar *ngIf=\"!inEdit\">\r\n <button style=\"width:100%\" mat-stroked-button (click)=\"add()\">\r\n Add an option <mat-icon>add</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n <mat-card *ngIf=\"!!inEdit\">\r\n <mat-card-header>\r\n <mat-card-title>Edit Option</mat-card-title>\r\n <mat-card-subtitle>Modify Option Details</mat-card-subtitle>\r\n </mat-card-header>\r\n\r\n <mat-card-content style=\"padding-top:16px ;\" >\r\n \r\n <form *ngIf=\"!!form\" [formGroup]=\"form\">\r\n <mat-form-field >\r\n <mat-label>label</mat-label>\r\n <input type=\"text\" matInput formControlName=\"label\" \r\n placeholder=\"enter option label\">\r\n <mat-hint>Label is required!</mat-hint>\r\n </mat-form-field>\r\n <mat-form-field >\r\n <mat-label>value</mat-label>\r\n <input type=\"text\" matInput formControlName=\"value\" \r\n placeholder=\"enter option value\">\r\n <mat-hint>value is required!</mat-hint>\r\n </mat-form-field>\r\n \r\n </form>\r\n \r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-button (click)=\"closeEdit()\">close</button>\r\n <button mat-button [disabled]=\"form.invalid\" (click)=\"save()\">Save</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n ", styles: ["mat-form-field{width:100%!important;background:azure}\n"] }]
128
128
  }], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
@@ -140,4 +140,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
140
140
  }] } });
141
141
 
142
142
  export { SelectionOptionsEditorComponent };
143
- //# sourceMappingURL=ngx-t-forms-selection-options-editor.component-B4LtSVfp.mjs.map
143
+ //# sourceMappingURL=ngx-t-forms-selection-options-editor.component--TlWm7_4.mjs.map