ngx-t-forms 0.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{ngx-t-forms-api-value-access-rules.component-4ZPgovTx.mjs → ngx-t-forms-api-value-access-rules.component-pmyW-mx7.mjs} +11 -11
- package/fesm2022/{ngx-t-forms-api-value-access-rules.component-4ZPgovTx.mjs.map → ngx-t-forms-api-value-access-rules.component-pmyW-mx7.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-tCsyuHd3.mjs → ngx-t-forms-calculated-field-rules.component-DP1UlCew.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-tCsyuHd3.mjs.map → ngx-t-forms-calculated-field-rules.component-DP1UlCew.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-C8jU6DUH.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-CbZRg_zQ.mjs} +6 -6
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CbZRg_zQ.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-form-input-selector.component-6eGpxdN5.mjs → ngx-t-forms-form-input-selector.component-BJm9gyXk.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-form-input-selector.component-6eGpxdN5.mjs.map → ngx-t-forms-form-input-selector.component-BJm9gyXk.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-DwEXL85v.mjs → ngx-t-forms-form-json-view.component-BY1A6dqj.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-form-json-view.component-DwEXL85v.mjs.map → ngx-t-forms-form-json-view.component-BY1A6dqj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-B5gtKLLC.mjs → ngx-t-forms-form-section-stepper.component-CYUj3li9.mjs} +5 -5
- package/fesm2022/ngx-t-forms-form-section-stepper.component-CYUj3li9.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-Bo1CKQsC.mjs → ngx-t-forms-forms-builder-menu.component-DBh2XvMV.mjs} +32 -36
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-DBh2XvMV.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-input-editor.component-Pv9Ka-hF.mjs +136 -0
- package/fesm2022/ngx-t-forms-input-editor.component-Pv9Ka-hF.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-DY7Tsn5l.mjs → ngx-t-forms-mat-chip-list-editor.component-BgfStriH.mjs} +10 -9
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-BgfStriH.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-Dgd5gyUu.mjs → ngx-t-forms-mat-slider-editor.component-CYyAcNf2.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-Dgd5gyUu.mjs.map → ngx-t-forms-mat-slider-editor.component-CYyAcNf2.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-ClM2gqVq.mjs → ngx-t-forms-mat-slider-toggle-editor.component-DFlNcNXN.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-ClM2gqVq.mjs.map → ngx-t-forms-mat-slider-toggle-editor.component-DFlNcNXN.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-DubPFwTw.mjs → ngx-t-forms-missing-form-configs.component-C5_wwf2z.mjs} +9 -13
- package/fesm2022/ngx-t-forms-missing-form-configs.component-C5_wwf2z.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-DtmVJG6v.mjs → ngx-t-forms-mscoa-segment-config.component-DD9mv-Lb.mjs} +5 -5
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-DD9mv-Lb.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs → ngx-t-forms-ngx-t-forms-BiFqmAIA.mjs} +1349 -251
- package/fesm2022/ngx-t-forms-ngx-t-forms-BiFqmAIA.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-DieETx2I.mjs → ngx-t-forms-pipeline-generator.component-DGEidXgr.mjs} +21 -21
- package/fesm2022/ngx-t-forms-pipeline-generator.component-DGEidXgr.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-required-inputs.component-Bi1wJdw3.mjs → ngx-t-forms-required-inputs.component-DS-D1d89.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-required-inputs.component-Bi1wJdw3.mjs.map → ngx-t-forms-required-inputs.component-DS-D1d89.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-Cd59pfG7.mjs → ngx-t-forms-rest-api-call-setup.component-BY555_zO.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-Cd59pfG7.mjs.map → ngx-t-forms-rest-api-call-setup.component-BY555_zO.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-section-report.component-CBXHr1qQ.mjs → ngx-t-forms-section-report.component-CUNhFUtC.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-section-report.component-CBXHr1qQ.mjs.map → ngx-t-forms-section-report.component-CUNhFUtC.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-DBlBUGkw.mjs → ngx-t-forms-selection-options-editor.component-zg8iAImG.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-DBlBUGkw.mjs.map → ngx-t-forms-selection-options-editor.component-zg8iAImG.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-gtr6Ohn3.mjs → ngx-t-forms-validators-config.component-Dt5oXQcY.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-validators-config.component-gtr6Ohn3.mjs.map → ngx-t-forms-validators-config.component-Dt5oXQcY.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/lib/components/form-builder/elements/form-section-stepper/form-section-stepper.component.d.ts +2 -92
- package/lib/components/form-builder/elements/forms-builder-menu/forms-builder-menu.component.d.ts +30 -12
- package/lib/components/form-builder/elements/input-element-editor/input-element-editor.component.d.ts +18 -16
- package/lib/components/form-builder/elements/missing-form-configs/missing-form-configs.component.d.ts +2 -2
- package/lib/components/forms/store/Forms-selectors.d.ts +2 -23
- package/lib/components/forms/store/forms-store.service.d.ts +2 -23
- package/lib/components/t-dynamic-data-edit/elements/config-mscoa-additional-inputs/config-mscoa-additional-inputs.component.d.ts +1 -1
- package/lib/components/t-dynamic-data-edit/elements/mat-chip-list-editor/mat-chip-list-editor.component.d.ts +2 -1
- package/lib/components/t-dynamic-data-edit/elements/mscoa-segment-config/mscoa-segment-config.component.d.ts +4 -4
- package/lib/components/t-dynamic-data-edit/elements/pipeline-generator/pipeline-generator.component.d.ts +2 -2
- package/lib/components/t-dynamic-data-edit/elements/t-workflow-picker/t-workflow-picker.component.d.ts +1 -1
- package/lib/components/t-dynamic-data-edit/t-dynamic-data-edit.component.d.ts +15 -8
- package/lib/services/core/t-form-tower-controller/functions/prePoPulateForm.d.ts +1 -84
- package/package.json +1 -1
- package/testForm.d.ts +797 -0
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-C8jU6DUH.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-section-stepper.component-B5gtKLLC.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-Bo1CKQsC.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-editor.component-C1kH_GDD.mjs +0 -126
- package/fesm2022/ngx-t-forms-input-editor.component-C1kH_GDD.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-DY7Tsn5l.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-missing-form-configs.component-DubPFwTw.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-DtmVJG6v.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-pipeline-generator.component-DieETx2I.mjs.map +0 -1
|
@@ -4,7 +4,7 @@ import * as i0 from '@angular/core';
|
|
|
4
4
|
import { EventEmitter, Output, Input, HostBinding, Optional, Self, Component } from '@angular/core';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { FormsModule } from '@angular/forms';
|
|
7
|
-
import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-
|
|
7
|
+
import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-BiFqmAIA.mjs';
|
|
8
8
|
import { MinInputTypes } from 'ngx-t-forms-types';
|
|
9
9
|
import { g as getInputIllustration } from './ngx-t-forms-getInputIllustration-GCSKx5e5.mjs';
|
|
10
10
|
import * as i4$1 from '@angular/material/form-field';
|
|
@@ -162,10 +162,10 @@ class RequiredInputsComponent {
|
|
|
162
162
|
get activatedInputs() {
|
|
163
163
|
return this.formInputsToMapTo.find((input) => input.activated);
|
|
164
164
|
}
|
|
165
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
166
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
165
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: RequiredInputsComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
166
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: RequiredInputsComponent, isStandalone: true, selector: "app-required-inputs", inputs: { errors: "errors", value: "value", formInputs: "formInputs" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: RequiredInputsComponent }], ngImport: i0, template: "<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>", styles: ["mat-form-field{background:azure;width:100%}mat-card{background:var(--mat-toolbar-container-background-color)}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:var(--mdc-elevated-card-container-color, var(--mat-app-surface-container-low));border-radius:4px;margin-bottom:16px}.info-icon{width:38px!important}\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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$1.MatCardContent, selector: "mat-card-content" }, { 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: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i6.MatListSubheaderCssMatStyler, selector: "[mat-subheader], [matSubheader]" }, { kind: "directive", type: i6.MatListItemLine, selector: "[matListItemLine]" }, { kind: "directive", type: i6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i5$2.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: FormsModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
167
167
|
}
|
|
168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: RequiredInputsComponent, decorators: [{
|
|
169
169
|
type: Component,
|
|
170
170
|
args: [{ selector: 'app-required-inputs', standalone: true, imports: [CommonModule, MatModulesModule, FormsModule], providers: [{ provide: MatFormFieldControl, useExisting: RequiredInputsComponent }], template: "<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>", styles: ["mat-form-field{background:azure;width:100%}mat-card{background:var(--mat-toolbar-container-background-color)}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:var(--mdc-elevated-card-container-color, var(--mat-app-surface-container-low));border-radius:4px;margin-bottom:16px}.info-icon{width:38px!important}\n"] }]
|
|
171
171
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
@@ -185,4 +185,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
185
185
|
}] } });
|
|
186
186
|
|
|
187
187
|
export { RequiredInputsComponent };
|
|
188
|
-
//# sourceMappingURL=ngx-t-forms-required-inputs.component-
|
|
188
|
+
//# sourceMappingURL=ngx-t-forms-required-inputs.component-DS-D1d89.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-required-inputs.component-Bi1wJdw3.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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AA,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-DS-D1d89.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;;AAvE7B,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,OAAO,CAAC,IAAI,CAAC,KAAK;;AAEpB,IAAA,IAAI,gBAAgB,GAAA;QAClB,OAAO,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK;;AAKtC,IAAA,IAAI,UAAU,GAAA;QACT,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,S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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-
|
|
7
|
+
import { e as TreeComponent, M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-BiFqmAIA.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.
|
|
138
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
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: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.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$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3$1.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i3$1.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i3$1.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i3$1.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i3$1.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.
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", 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.
|
|
268
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
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: i3.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$1.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.
|
|
270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", 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.1", ngImpor
|
|
|
289
289
|
}] } });
|
|
290
290
|
|
|
291
291
|
export { RestApiCallSetupComponent };
|
|
292
|
-
//# sourceMappingURL=ngx-t-forms-rest-api-call-setup.component-
|
|
292
|
+
//# sourceMappingURL=ngx-t-forms-rest-api-call-setup.component-BY555_zO.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-rest-api-call-setup.component-Cd59pfG7.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 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 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,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C,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-BY555_zO.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 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 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,UAAU,IAAG;QACzB,OAAO,aAAa,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC;AACrD,KAAC,CAAC;AAEV;AAEgB,SAAA,aAAa,CACzB,KAAoB,EACpB,UAAkB,EAAA;AAElB,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,KAAK;AAExB,IAAA,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;;QAEtB,IAAI,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC;YAC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;;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-
|
|
3
|
+
import { F as FormsStoreService, M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-BiFqmAIA.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.
|
|
140
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
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: i5.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$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i5$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5$1.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.
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", 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.1", ngImpor
|
|
|
153
153
|
}] } });
|
|
154
154
|
|
|
155
155
|
export { SectionReportComponent };
|
|
156
|
-
//# sourceMappingURL=ngx-t-forms-section-report.component-
|
|
156
|
+
//# sourceMappingURL=ngx-t-forms-section-report.component-CUNhFUtC.mjs.map
|