ngx-t-forms 2.0.25 → 2.0.27
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-calculated-field-rules.component-DiNSTxsW.mjs → ngx-t-forms-calculated-field-rules.component-Cs_Lhz_D.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-DiNSTxsW.mjs.map → ngx-t-forms-calculated-field-rules.component-Cs_Lhz_D.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-3FkGwVWB.mjs → ngx-t-forms-chip-options-creator-editor.component-DkTpG5yQ.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-3FkGwVWB.mjs.map → ngx-t-forms-chip-options-creator-editor.component-DkTpG5yQ.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-tHaWIt1o.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-DJ9d3Oy9.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-tHaWIt1o.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-DJ9d3Oy9.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-data-source-picker.component-CxG1tQfC.mjs → ngx-t-forms-data-source-picker.component-CFQ_GVPG.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-data-source-picker.component-CxG1tQfC.mjs.map → ngx-t-forms-data-source-picker.component-CFQ_GVPG.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-CsqYlgS6.mjs → ngx-t-forms-document-list-label-config-editor.component-CPF_BLRA.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-CsqYlgS6.mjs.map → ngx-t-forms-document-list-label-config-editor.component-CPF_BLRA.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-input-selector.component-D-nVF7t7.mjs → ngx-t-forms-form-input-selector.component-C38FXT55.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-form-input-selector.component-D-nVF7t7.mjs.map → ngx-t-forms-form-input-selector.component-C38FXT55.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-B01nOklu.mjs → ngx-t-forms-form-json-view.component-C7i6JZ-l.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-B01nOklu.mjs.map → ngx-t-forms-form-json-view.component-C7i6JZ-l.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-section-stepper.component-CJz0yr78.mjs +264 -0
- package/fesm2022/ngx-t-forms-form-section-stepper.component-CJz0yr78.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-G3Agd-vE.mjs +349 -0
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-G3Agd-vE.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-editor.component-DyQBfgio.mjs → ngx-t-forms-input-editor.component-B12zbXE1.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-input-editor.component-DyQBfgio.mjs.map → ngx-t-forms-input-editor.component-B12zbXE1.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-BCoTHeK3.mjs → ngx-t-forms-mat-chip-list-editor.component-dIY3BX1u.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-BCoTHeK3.mjs.map → ngx-t-forms-mat-chip-list-editor.component-dIY3BX1u.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-WDd5lc_2.mjs → ngx-t-forms-mat-slider-editor.component-yMRCg8fo.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-WDd5lc_2.mjs.map → ngx-t-forms-mat-slider-editor.component-yMRCg8fo.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-DGac4Eja.mjs → ngx-t-forms-mat-slider-toggle-editor.component-0aUVP9A6.mjs} +4 -4
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-0aUVP9A6.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-sJVu5SkY.mjs → ngx-t-forms-missing-form-configs.component-CsPMQZqg.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-sJVu5SkY.mjs.map → ngx-t-forms-missing-form-configs.component-CsPMQZqg.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-CF5DxLZG.mjs → ngx-t-forms-mscoa-chart-toolbar.component-D8a9-6lt.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-CF5DxLZG.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-D8a9-6lt.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-D9zKeT7Z.mjs → ngx-t-forms-mscoa-error-display.component-DwbyXd_D.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-D9zKeT7Z.mjs.map → ngx-t-forms-mscoa-error-display.component-DwbyXd_D.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-BIr1g5cG.mjs → ngx-t-forms-mscoa-segment-config.component-BXPghOuH.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-BIr1g5cG.mjs.map → ngx-t-forms-mscoa-segment-config.component-BXPghOuH.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-DgdZwE72.mjs → ngx-t-forms-mscoa-temporary-hint.component-CBRfWvfD.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-DgdZwE72.mjs.map → ngx-t-forms-mscoa-temporary-hint.component-CBRfWvfD.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-ngx-t-forms-A9_4GxP6.mjs → ngx-t-forms-ngx-t-forms-CD9InaXz.mjs} +99 -73
- package/fesm2022/ngx-t-forms-ngx-t-forms-CD9InaXz.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-CwCwl53b.mjs → ngx-t-forms-pipeline-generator.component-QE-I58e4.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-CwCwl53b.mjs.map → ngx-t-forms-pipeline-generator.component-QE-I58e4.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-record-list-manager.component-BYyr0yzb.mjs → ngx-t-forms-record-list-manager.component-D4wlLtdc.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-record-list-manager.component-BYyr0yzb.mjs.map → ngx-t-forms-record-list-manager.component-D4wlLtdc.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-BoqmVDp2.mjs +192 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-BoqmVDp2.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-CQeww1qM.mjs → ngx-t-forms-rest-api-call-setup.component-CtfudSGT.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-CQeww1qM.mjs.map → ngx-t-forms-rest-api-call-setup.component-CtfudSGT.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-section-report.component-DGwgq4QR.mjs → ngx-t-forms-section-report.component-Dntm1m5b.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-section-report.component-DGwgq4QR.mjs.map → ngx-t-forms-section-report.component-Dntm1m5b.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-CqAxZnEp.mjs → ngx-t-forms-selection-options-editor.component-Cc_qCtW2.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-CqAxZnEp.mjs.map → ngx-t-forms-selection-options-editor.component-Cc_qCtW2.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-Cz6YZMia.mjs → ngx-t-forms-t-workflow-picker.component-xvX8t0pu.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-Cz6YZMia.mjs.map → ngx-t-forms-t-workflow-picker.component-xvX8t0pu.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-CL73KUxw.mjs → ngx-t-forms-validators-config.component-D6JG1p81.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-validators-config.component-CL73KUxw.mjs.map → ngx-t-forms-validators-config.component-D6JG1p81.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/lib/components/form-builder/elements/form-submissions-config/form-submissions-config.component.d.ts +1 -1
- package/lib/components/forms/forms.component.d.ts +7 -0
- package/lib/components/t-dynamic-data-edit/elements/required-inputs/required-inputs.component.d.ts +1 -0
- package/package.json +1 -1
- package/fesm2022/ngx-t-forms-form-section-stepper.component-Bg9eGmgN.mjs +0 -267
- package/fesm2022/ngx-t-forms-form-section-stepper.component-Bg9eGmgN.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-jn9-yVbI.mjs +0 -348
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-jn9-yVbI.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-DGac4Eja.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-A9_4GxP6.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-pv5pqFhh.mjs +0 -188
- package/fesm2022/ngx-t-forms-required-inputs.component-pv5pqFhh.mjs.map +0 -1
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import * as i2 from '@angular/common';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { EventEmitter, Output, Input, HostBinding, Optional, Self, Component } from '@angular/core';
|
|
5
|
-
import * as i1 from '@angular/forms';
|
|
6
|
-
import { FormsModule } from '@angular/forms';
|
|
7
|
-
import { f as getInputIllustration, M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-A9_4GxP6.mjs';
|
|
8
|
-
import { MinInputTypes } from 'ngx-t-forms-types';
|
|
9
|
-
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
10
|
-
import { Subject } from 'rxjs';
|
|
11
|
-
import * as i2$1 from '@angular/material/autocomplete';
|
|
12
|
-
import * as i2$2 from '@angular/material/button';
|
|
13
|
-
import * as i3 from '@angular/material/card';
|
|
14
|
-
import * as i5 from '@angular/material/chips';
|
|
15
|
-
import * as i4 from '@angular/material/divider';
|
|
16
|
-
import * as i2$3 from '@angular/material/icon';
|
|
17
|
-
import * as i6 from '@angular/material/list';
|
|
18
|
-
import * as i2$4 from '@angular/material/select';
|
|
19
|
-
import * as i10 from '@angular/material/toolbar';
|
|
20
|
-
import * as i3$1 from '@angular/material/input';
|
|
21
|
-
|
|
22
|
-
class RequiredInputsComponent {
|
|
23
|
-
static { this.nextId = 0; }
|
|
24
|
-
constructor(ngControl, _elementRef) {
|
|
25
|
-
this.ngControl = ngControl;
|
|
26
|
-
this._elementRef = _elementRef;
|
|
27
|
-
this.stateChanges = new Subject();
|
|
28
|
-
this.id = `app-required-inputs-${RequiredInputsComponent.nextId++}`;
|
|
29
|
-
this.placeholder = '';
|
|
30
|
-
this.focused = false;
|
|
31
|
-
this.required = false;
|
|
32
|
-
this.disabled = false;
|
|
33
|
-
this.errors = [];
|
|
34
|
-
this.touched = false;
|
|
35
|
-
this.onTouched = () => { };
|
|
36
|
-
this._value = [];
|
|
37
|
-
this.formInputs = [];
|
|
38
|
-
this.valueChanged = new EventEmitter();
|
|
39
|
-
this.activeInput = '';
|
|
40
|
-
this.minInputTypes = MinInputTypes;
|
|
41
|
-
}
|
|
42
|
-
get empty() {
|
|
43
|
-
return !this.value;
|
|
44
|
-
}
|
|
45
|
-
get shouldLabelFloat() {
|
|
46
|
-
return this.focused || !this.empty;
|
|
47
|
-
}
|
|
48
|
-
get errorState() {
|
|
49
|
-
const hasError = !!this.ngControl?.control?.errors || (this.errors || []).length > 0 && this.touched;
|
|
50
|
-
return !this.value && !!this.required || hasError;
|
|
51
|
-
}
|
|
52
|
-
setDescribedByIds(ids) {
|
|
53
|
-
// Ensure the component view is initialized
|
|
54
|
-
if (this._elementRef && this._elementRef.nativeElement) {
|
|
55
|
-
const controlElement = this._elementRef.nativeElement.querySelector('.app-required-inputs');
|
|
56
|
-
// Check if the controlElement exists before attempting to set its attribute
|
|
57
|
-
if (controlElement) {
|
|
58
|
-
controlElement.setAttribute('aria-describedby', ids.join(' '));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
onContainerClick(event) {
|
|
63
|
-
this.markAsTouched();
|
|
64
|
-
this.stateChanges.next();
|
|
65
|
-
}
|
|
66
|
-
markAsTouched() {
|
|
67
|
-
console.log('markAsTouched');
|
|
68
|
-
if (!this.touched) {
|
|
69
|
-
this.onTouched();
|
|
70
|
-
this.touched = true;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
set value(v) {
|
|
74
|
-
const changed = JSON.stringify(this._value) !== JSON.stringify(v);
|
|
75
|
-
if (changed) {
|
|
76
|
-
this._value = v;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
get value() {
|
|
80
|
-
return this._value;
|
|
81
|
-
}
|
|
82
|
-
minInputValueType(type) {
|
|
83
|
-
if (type === "mapDocFilter" && !!this.minInputInEdit) {
|
|
84
|
-
this.minInputInEdit.mapTo = [];
|
|
85
|
-
}
|
|
86
|
-
if (this.minInputInEdit?.type === type) {
|
|
87
|
-
this.minInputInEdit.type = undefined;
|
|
88
|
-
}
|
|
89
|
-
else if (this.minInputInEdit) {
|
|
90
|
-
this.minInputInEdit.type = type;
|
|
91
|
-
}
|
|
92
|
-
this.valueChanged.emit(this.value);
|
|
93
|
-
}
|
|
94
|
-
get minInputInEdit() {
|
|
95
|
-
return this.value?.find((v) => v.name === this.activeInput) || {};
|
|
96
|
-
}
|
|
97
|
-
set minInputInEdit(v) {
|
|
98
|
-
this.value = this.value.map((val) => {
|
|
99
|
-
if (val.name === this.activeInput) {
|
|
100
|
-
return v;
|
|
101
|
-
}
|
|
102
|
-
return val;
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
save() {
|
|
106
|
-
this.valueChanged.emit(this.value);
|
|
107
|
-
this.activeInput = '';
|
|
108
|
-
}
|
|
109
|
-
inputIsDisabled(input) {
|
|
110
|
-
return input['element'] === 'sectionTitle';
|
|
111
|
-
}
|
|
112
|
-
mapTo(input) {
|
|
113
|
-
const inp = this.minInputInEdit;
|
|
114
|
-
const mapToThis = {
|
|
115
|
-
formControlName: input.formControlName,
|
|
116
|
-
dataType: input.dataType,
|
|
117
|
-
element: input.element,
|
|
118
|
-
inputId: input.id
|
|
119
|
-
};
|
|
120
|
-
if (!!inp && this.minInputInEdit?.type === MinInputTypes.MapTo) {
|
|
121
|
-
inp.mapTo?.formControlName === mapToThis.formControlName
|
|
122
|
-
? (inp.mapTo = undefined)
|
|
123
|
-
: (inp.mapTo = mapToThis);
|
|
124
|
-
}
|
|
125
|
-
if (!!inp && this.minInputInEdit?.type === 'mapDocFilter') {
|
|
126
|
-
if (this.inputMappedTo(mapToThis.formControlName)) {
|
|
127
|
-
inp.mapTo.splice(inp.mapTo.indexOf(mapToThis), 1);
|
|
128
|
-
}
|
|
129
|
-
else if (typeof inp.mapTo === "string" || !inp.mapTo || !!inp.mapTo.find(inp => typeof inp === "string")) {
|
|
130
|
-
inp.mapTo = [mapToThis];
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
inp.mapTo.push(mapToThis);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
console.log(this.value);
|
|
137
|
-
this.valueChanged.emit(this.value);
|
|
138
|
-
}
|
|
139
|
-
inputMappedTo(formControlName) {
|
|
140
|
-
if (this.minInputInEdit?.type === 'mapto') {
|
|
141
|
-
return this.minInputInEdit?.mapTo?.formControlName === formControlName;
|
|
142
|
-
}
|
|
143
|
-
if (this.minInputInEdit?.type === 'mapDocFilter') {
|
|
144
|
-
return !!this.minInputInEdit?.mapTo?.find(m => m.formControlName === formControlName);
|
|
145
|
-
}
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
getInputIllustration(input) {
|
|
149
|
-
return getInputIllustration(input.element);
|
|
150
|
-
}
|
|
151
|
-
get formInputsToMapTo() {
|
|
152
|
-
return this.formInputs.filter((input) => !this.inputIsDisabled(input)).map((input) => {
|
|
153
|
-
return {
|
|
154
|
-
...input,
|
|
155
|
-
illustration: this.getInputIllustration(input),
|
|
156
|
-
activated: this.inputMappedTo(input.formControlName)
|
|
157
|
-
};
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
get activatedInputs() {
|
|
161
|
-
return this.formInputsToMapTo.find((input) => input.activated);
|
|
162
|
-
}
|
|
163
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: RequiredInputsComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
164
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: RequiredInputsComponent, isStandalone: true, selector: "app-required-inputs", inputs: { disabled: "disabled", 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 [disabled]=\"disabled\"\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\" subscriptSizing=\"dynamic\" >\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'\" subscriptSizing=\"dynamic\" >\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 [disabled]=\"disabled\" *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: 0.8125em; 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-sys-surface-container)}.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: i2$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i5.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: i5.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i2$3.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: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i2$4.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: i10.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i3$1.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"] }] }); }
|
|
165
|
-
}
|
|
166
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: RequiredInputsComponent, decorators: [{
|
|
167
|
-
type: Component,
|
|
168
|
-
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 [disabled]=\"disabled\"\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\" subscriptSizing=\"dynamic\" >\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'\" subscriptSizing=\"dynamic\" >\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 [disabled]=\"disabled\" *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: 0.8125em; 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-sys-surface-container)}.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"] }]
|
|
169
|
-
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
170
|
-
type: Optional
|
|
171
|
-
}, {
|
|
172
|
-
type: Self
|
|
173
|
-
}] }, { type: i0.ElementRef }], propDecorators: { id: [{
|
|
174
|
-
type: HostBinding
|
|
175
|
-
}], disabled: [{
|
|
176
|
-
type: Input
|
|
177
|
-
}], errors: [{
|
|
178
|
-
type: Input
|
|
179
|
-
}], value: [{
|
|
180
|
-
type: Input
|
|
181
|
-
}], formInputs: [{
|
|
182
|
-
type: Input
|
|
183
|
-
}], valueChanged: [{
|
|
184
|
-
type: Output
|
|
185
|
-
}] } });
|
|
186
|
-
|
|
187
|
-
export { RequiredInputsComponent };
|
|
188
|
-
//# sourceMappingURL=ngx-t-forms-required-inputs.component-pv5pqFhh.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-required-inputs.component-pv5pqFhh.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 @Input() 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 [disabled]=\"disabled\"\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\" subscriptSizing=\"dynamic\" >\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'\" subscriptSizing=\"dynamic\" >\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 [disabled]=\"disabled\" *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: 0.8125em; 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;QAChB,IAAQ,CAAA,QAAA,GAAY,KAAK;QACrB,IAAM,CAAA,MAAA,GAAoC,EAAE;QAyBzD,IAAO,CAAA,OAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,SAAS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