onshore-forms 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/esm2020/lib/components/form-autocomplete-item/form-autocomplete-item.component.mjs +11 -0
  2. package/esm2020/lib/components/form-checkbox-item/form-checkbox-item.component.mjs +62 -0
  3. package/esm2020/lib/components/form-colorpicker-item/form-colorpicker-item.component.mjs +69 -0
  4. package/esm2020/lib/components/form-dropdown-item/form-dropdown-item.component.mjs +65 -0
  5. package/esm2020/lib/components/form-image-item/form-image-item.component.mjs +160 -0
  6. package/esm2020/lib/components/form-input-item/form-input-item.component.mjs +63 -0
  7. package/esm2020/lib/components/form-switch-item/form-switch-item.component.mjs +65 -0
  8. package/esm2020/lib/components/form-textarea-item/form-textarea-item.component.mjs +61 -0
  9. package/esm2020/lib/components/form-validation-output/form-validation-output.component.mjs +41 -0
  10. package/esm2020/lib/enums/form.enums.mjs +26 -0
  11. package/esm2020/lib/models/form.models.mjs +2 -0
  12. package/esm2020/lib/onshore-forms.component.mjs +22 -0
  13. package/esm2020/lib/onshore-forms.module.mjs +134 -0
  14. package/esm2020/lib/onshore-forms.service.mjs +151 -0
  15. package/esm2020/onshore-forms.mjs +5 -0
  16. package/esm2020/public-api.mjs +18 -0
  17. package/fesm2015/onshore-forms.mjs +921 -0
  18. package/fesm2015/onshore-forms.mjs.map +1 -0
  19. package/fesm2020/onshore-forms.mjs +877 -0
  20. package/fesm2020/onshore-forms.mjs.map +1 -0
  21. package/index.d.ts +5 -0
  22. package/lib/components/form-autocomplete-item/form-autocomplete-item.component.d.ts +5 -0
  23. package/lib/components/form-checkbox-item/form-checkbox-item.component.d.ts +21 -0
  24. package/lib/components/form-colorpicker-item/form-colorpicker-item.component.d.ts +23 -0
  25. package/lib/components/form-dropdown-item/form-dropdown-item.component.d.ts +22 -0
  26. package/lib/components/form-image-item/form-image-item.component.d.ts +40 -0
  27. package/lib/components/form-input-item/form-input-item.component.d.ts +23 -0
  28. package/lib/components/form-switch-item/form-switch-item.component.d.ts +21 -0
  29. package/lib/components/form-textarea-item/form-textarea-item.component.d.ts +22 -0
  30. package/lib/components/form-validation-output/form-validation-output.component.d.ts +17 -0
  31. package/lib/enums/form.enums.d.ts +23 -0
  32. package/lib/models/form.models.d.ts +61 -0
  33. package/lib/onshore-forms.component.d.ts +8 -0
  34. package/lib/onshore-forms.module.d.ts +31 -0
  35. package/lib/onshore-forms.service.d.ts +32 -0
  36. package/package.json +21 -10
  37. package/{src/public-api.ts → public-api.d.ts} +0 -4
  38. package/karma.conf.js +0 -44
  39. package/ng-package.json +0 -11
  40. package/src/lib/components/form-autocomplete-item/form-autocomplete-item.component.html +0 -46
  41. package/src/lib/components/form-autocomplete-item/form-autocomplete-item.component.scss +0 -0
  42. package/src/lib/components/form-autocomplete-item/form-autocomplete-item.component.ts +0 -133
  43. package/src/lib/components/form-checkbox-item/form-checkbox-item.component.html +0 -23
  44. package/src/lib/components/form-checkbox-item/form-checkbox-item.component.scss +0 -0
  45. package/src/lib/components/form-checkbox-item/form-checkbox-item.component.ts +0 -65
  46. package/src/lib/components/form-colorpicker-item/form-colorpicker-item.component.html +0 -30
  47. package/src/lib/components/form-colorpicker-item/form-colorpicker-item.component.scss +0 -0
  48. package/src/lib/components/form-colorpicker-item/form-colorpicker-item.component.ts +0 -71
  49. package/src/lib/components/form-dropdown-item/form-dropdown-item.component.html +0 -44
  50. package/src/lib/components/form-dropdown-item/form-dropdown-item.component.scss +0 -0
  51. package/src/lib/components/form-dropdown-item/form-dropdown-item.component.ts +0 -68
  52. package/src/lib/components/form-image-item/form-image-item.component.html +0 -79
  53. package/src/lib/components/form-image-item/form-image-item.component.scss +0 -3
  54. package/src/lib/components/form-image-item/form-image-item.component.ts +0 -155
  55. package/src/lib/components/form-input-item/form-input-item.component.html +0 -81
  56. package/src/lib/components/form-input-item/form-input-item.component.scss +0 -3
  57. package/src/lib/components/form-input-item/form-input-item.component.ts +0 -66
  58. package/src/lib/components/form-switch-item/form-switch-item.component.html +0 -8
  59. package/src/lib/components/form-switch-item/form-switch-item.component.scss +0 -0
  60. package/src/lib/components/form-switch-item/form-switch-item.component.ts +0 -72
  61. package/src/lib/components/form-textarea-item/form-textarea-item.component.html +0 -39
  62. package/src/lib/components/form-textarea-item/form-textarea-item.component.scss +0 -0
  63. package/src/lib/components/form-textarea-item/form-textarea-item.component.ts +0 -64
  64. package/src/lib/components/form-validation-output/form-validation-output.component.html +0 -2
  65. package/src/lib/components/form-validation-output/form-validation-output.component.scss +0 -1
  66. package/src/lib/components/form-validation-output/form-validation-output.component.ts +0 -43
  67. package/src/lib/enums/form.enums.ts +0 -24
  68. package/src/lib/models/form.models.ts +0 -70
  69. package/src/lib/onshore-forms.component.ts +0 -20
  70. package/src/lib/onshore-forms.module.ts +0 -78
  71. package/src/lib/onshore-forms.service.ts +0 -172
  72. package/src/test.ts +0 -27
  73. package/styles/css/main.css +0 -1
  74. package/styles/css/theme1.css +0 -1
  75. package/tsconfig.lib.json +0 -24
  76. package/tsconfig.lib.prod.json +0 -20
  77. package/tsconfig.spec.json +0 -17
@@ -0,0 +1,921 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, ChangeDetectionStrategy, Input, Self, Optional, EventEmitter, Output, NgModule } from '@angular/core';
3
+ import * as i1$1 from '@angular/forms';
4
+ import { FormGroup, FormControl, FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
+ import { Subject, debounceTime, distinctUntilChanged, skip } from 'rxjs';
6
+ import * as i2 from '@angular/common';
7
+ import { CommonModule } from '@angular/common';
8
+ import * as i3 from 'primeng/tooltip';
9
+ import { TooltipModule } from 'primeng/tooltip';
10
+ import * as i4 from 'primeng/inputnumber';
11
+ import { InputNumberModule } from 'primeng/inputnumber';
12
+ import * as i5 from 'primeng/inputtext';
13
+ import { InputTextModule } from 'primeng/inputtext';
14
+ import * as i1 from '@ngx-translate/core';
15
+ import * as i4$1 from 'primeng/inputswitch';
16
+ import { InputSwitchModule } from 'primeng/inputswitch';
17
+ import * as i4$2 from 'primeng/inputtextarea';
18
+ import { InputTextareaModule } from 'primeng/inputtextarea';
19
+ import * as i2$1 from 'primeng/dynamicdialog';
20
+ import * as i5$1 from 'primeng/button';
21
+ import { ButtonModule } from 'primeng/button';
22
+ import * as i6 from 'primeng/ripple';
23
+ import { RippleModule } from 'primeng/ripple';
24
+ import * as i3$1 from 'primeng/dropdown';
25
+ import { DropdownModule } from 'primeng/dropdown';
26
+ import * as i4$3 from 'primeng/multiselect';
27
+ import { MultiSelectModule } from 'primeng/multiselect';
28
+ import * as i3$2 from 'primeng/colorpicker';
29
+ import { ColorPickerModule } from 'primeng/colorpicker';
30
+ import * as i3$3 from 'primeng/checkbox';
31
+ import { CheckboxModule } from 'primeng/checkbox';
32
+ import { AutoCompleteModule } from 'primeng/autocomplete';
33
+ import { DialogModule } from 'primeng/dialog';
34
+
35
+ var OnshoreFormTemplateType;
36
+ (function (OnshoreFormTemplateType) {
37
+ OnshoreFormTemplateType["text"] = "text";
38
+ OnshoreFormTemplateType["textarea"] = "textarea";
39
+ OnshoreFormTemplateType["editor"] = "editor";
40
+ OnshoreFormTemplateType["password"] = "password";
41
+ OnshoreFormTemplateType["number"] = "number";
42
+ OnshoreFormTemplateType["email"] = "email";
43
+ OnshoreFormTemplateType["phone"] = "phone";
44
+ OnshoreFormTemplateType["regexp"] = "regexp";
45
+ OnshoreFormTemplateType["select"] = "select";
46
+ OnshoreFormTemplateType["check"] = "check";
47
+ OnshoreFormTemplateType["radio"] = "radio";
48
+ OnshoreFormTemplateType["image"] = "image";
49
+ OnshoreFormTemplateType["autocomplete"] = "autocomplete";
50
+ OnshoreFormTemplateType["color"] = "color";
51
+ OnshoreFormTemplateType["subform"] = "subform";
52
+ })(OnshoreFormTemplateType || (OnshoreFormTemplateType = {}));
53
+ var OnshoreImageError;
54
+ (function (OnshoreImageError) {
55
+ OnshoreImageError["none"] = "";
56
+ OnshoreImageError["fileType"] = "fileType";
57
+ OnshoreImageError["ratio"] = "ratio";
58
+ OnshoreImageError["size"] = "size";
59
+ })(OnshoreImageError || (OnshoreImageError = {}));
60
+
61
+ class OnshoreFormsService {
62
+ constructor() {
63
+ this._formValidations = [];
64
+ this.subscriptions = [];
65
+ this.isLoading$ = new Subject();
66
+ this._form = new FormGroup({}, { updateOn: 'change' });
67
+ this._formTemplate = [];
68
+ }
69
+ get form() {
70
+ return this._form;
71
+ }
72
+ get formValues() {
73
+ var _a;
74
+ return (_a = this._form) === null || _a === void 0 ? void 0 : _a.value;
75
+ }
76
+ patchForm(value) {
77
+ var _a;
78
+ (_a = this._form) === null || _a === void 0 ? void 0 : _a.patchValue(value);
79
+ }
80
+ resetForm() {
81
+ var _a, _b;
82
+ (_a = this._form) === null || _a === void 0 ? void 0 : _a.reset();
83
+ (_b = this._form) === null || _b === void 0 ? void 0 : _b.updateValueAndValidity({ onlySelf: false, emitEvent: true });
84
+ this.subscriptions.forEach((subscription) => {
85
+ subscription.unsubscribe();
86
+ });
87
+ this._form = null;
88
+ this._formTemplate = null;
89
+ }
90
+ generateForm(formTemplate) {
91
+ this._formTemplate = formTemplate;
92
+ this._form = new FormGroup({}, { updateOn: 'change' });
93
+ this._form = this.iterateNestedForm(this._form, formTemplate);
94
+ return this._form;
95
+ }
96
+ formTemplate(name, formTemplate = this._formTemplate) {
97
+ let template;
98
+ if (formTemplate) {
99
+ for (let i = 0; i < (formTemplate === null || formTemplate === void 0 ? void 0 : formTemplate.length); i++) {
100
+ const item = formTemplate[i];
101
+ if (item.name === name) {
102
+ template = item;
103
+ i = formTemplate.length;
104
+ }
105
+ else if (item.subformArray) {
106
+ const arrayTemplate = this.formTemplate(name, item.subformArray);
107
+ if (arrayTemplate)
108
+ template = arrayTemplate;
109
+ }
110
+ else if (item.subformObject) {
111
+ const objectTemplate = this.formTemplate(name, item.subformObject);
112
+ if (objectTemplate)
113
+ template = objectTemplate;
114
+ }
115
+ }
116
+ }
117
+ return template;
118
+ }
119
+ formControl(name, formGroup = this._form) {
120
+ return formGroup === null || formGroup === void 0 ? void 0 : formGroup.get(name);
121
+ }
122
+ formArray(name) {
123
+ var _a;
124
+ return (_a = this._form) === null || _a === void 0 ? void 0 : _a.get(name);
125
+ }
126
+ formGroup(form, name) {
127
+ return form.get(name);
128
+ }
129
+ addFormArrayItem(name, item) {
130
+ var _a;
131
+ let formControls = {};
132
+ if (item) {
133
+ (_a = item.subformArray) === null || _a === void 0 ? void 0 : _a.forEach((subitem) => {
134
+ formControls[subitem.name] = new FormControl(subitem.default !== undefined ? subitem.default : '', {
135
+ validators: subitem.validators || [],
136
+ updateOn: 'change'
137
+ });
138
+ });
139
+ }
140
+ const formGroup = new FormGroup(formControls);
141
+ formGroup.setParent(this.formArray(name));
142
+ this.formArray(name).push(formGroup);
143
+ this.subscribeNestedFormGroup(formGroup);
144
+ }
145
+ removeFormArrayItem(form, index) {
146
+ form.removeAt(index);
147
+ }
148
+ setFormValidations(validations = []) {
149
+ this._formValidations = validations;
150
+ }
151
+ enable() {
152
+ setTimeout(() => {
153
+ var _a;
154
+ (_a = this._form) === null || _a === void 0 ? void 0 : _a.enable({ onlySelf: true, emitEvent: false });
155
+ }, 100);
156
+ }
157
+ disable() {
158
+ setTimeout(() => {
159
+ var _a;
160
+ (_a = this._form) === null || _a === void 0 ? void 0 : _a.disable({ onlySelf: true, emitEvent: false });
161
+ }, 100);
162
+ }
163
+ setError(control, error) {
164
+ this.formControl(control).setErrors(error);
165
+ }
166
+ setLoader(loaders$) {
167
+ loaders$.forEach($loader => {
168
+ this.subscriptions.push($loader.subscribe(isLoading => {
169
+ isLoading ? this.disable() : this.enable();
170
+ this.isLoading$.next(isLoading);
171
+ }));
172
+ });
173
+ }
174
+ iterateNestedForm(form, formTemplate) {
175
+ formTemplate.forEach((item) => {
176
+ if (item.type === OnshoreFormTemplateType.subform) {
177
+ if (item.subformArray) {
178
+ form.controls[item.name] = new FormArray([]);
179
+ form.controls[item.name].setParent(form);
180
+ }
181
+ if (item.subformObject) {
182
+ form.controls[item.name] = new FormGroup({});
183
+ form.controls[item.name] = this.iterateNestedForm(form.controls[item.name], item.subformObject);
184
+ this.subscribeNestedFormGroup(form.controls[item.name]);
185
+ }
186
+ }
187
+ else {
188
+ form.addControl(item.name, new FormControl(item.default !== undefined ? item.default : '', {
189
+ validators: item.validators || [],
190
+ updateOn: 'change'
191
+ }));
192
+ }
193
+ });
194
+ return form;
195
+ }
196
+ subscribeNestedFormGroup(nestedFormItem) {
197
+ this.subscriptions.push(nestedFormItem.valueChanges.subscribe(() => {
198
+ var _a;
199
+ (_a = this.form) === null || _a === void 0 ? void 0 : _a.updateValueAndValidity({ onlySelf: true, emitEvent: false });
200
+ }));
201
+ this.subscriptions.push(nestedFormItem.statusChanges.subscribe(() => {
202
+ var _a;
203
+ (_a = this.form) === null || _a === void 0 ? void 0 : _a.updateValueAndValidity({ onlySelf: true, emitEvent: false });
204
+ }));
205
+ }
206
+ }
207
+ OnshoreFormsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
208
+ OnshoreFormsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsService, providedIn: 'root' });
209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsService, decorators: [{
210
+ type: Injectable,
211
+ args: [{
212
+ providedIn: 'root'
213
+ }]
214
+ }], ctorParameters: function () { return []; } });
215
+
216
+ class OnshoreFormsComponent {
217
+ constructor() { }
218
+ ngOnInit() {
219
+ }
220
+ }
221
+ OnshoreFormsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
222
+ OnshoreFormsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormsComponent, selector: "lib-onshore-forms", ngImport: i0, template: `
223
+ <p>
224
+ onshore-forms works 2!
225
+ </p>
226
+ `, isInline: true });
227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsComponent, decorators: [{
228
+ type: Component,
229
+ args: [{ selector: 'lib-onshore-forms', template: `
230
+ <p>
231
+ onshore-forms works 2!
232
+ </p>
233
+ ` }]
234
+ }], ctorParameters: function () { return []; } });
235
+
236
+ class OnshoreFormValidationOutputComponent {
237
+ constructor(cdr, translate) {
238
+ this.cdr = cdr;
239
+ this.translate = translate;
240
+ this.externValidationPattern = "";
241
+ this.validationTranslation = '';
242
+ }
243
+ ngOnChanges(changes) {
244
+ this.validationTranslation = '';
245
+ if (changes['validationErrors'].currentValue) {
246
+ Object.keys(this.validationErrors).forEach(error => {
247
+ const exists = Object.values(this.validationItems).filter(validationItem => validationItem.key == error);
248
+ if (exists && exists.length > 0) {
249
+ this.validationTranslation += this.translate.instant('request.error.' + error) + '<br>';
250
+ }
251
+ else {
252
+ const errorValues = this.validationErrors[error];
253
+ this.validationTranslation += this.translate.instant('form.validation.' + error, errorValues) + '<br>';
254
+ }
255
+ });
256
+ }
257
+ this.cdr.markForCheck();
258
+ }
259
+ }
260
+ OnshoreFormValidationOutputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormValidationOutputComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
261
+ OnshoreFormValidationOutputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormValidationOutputComponent, selector: "onshore-form-validation-output", inputs: { validationErrors: "validationErrors", externValidationPattern: "externValidationPattern", validationItems: "validationItems" }, usesOnChanges: true, ngImport: i0, template: "<small *ngIf=\"validationErrors && validationErrors['pattern']\" [innerHTML]=\"externValidationPattern\"></small>\n<small *ngIf=\"validationTranslation\" [innerHTML]=\"validationTranslation\"></small>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
262
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormValidationOutputComponent, decorators: [{
263
+ type: Component,
264
+ args: [{ selector: 'onshore-form-validation-output', changeDetection: ChangeDetectionStrategy.OnPush, template: "<small *ngIf=\"validationErrors && validationErrors['pattern']\" [innerHTML]=\"externValidationPattern\"></small>\n<small *ngIf=\"validationTranslation\" [innerHTML]=\"validationTranslation\"></small>\n" }]
265
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TranslateService }]; }, propDecorators: { validationErrors: [{
266
+ type: Input
267
+ }], externValidationPattern: [{
268
+ type: Input
269
+ }], validationItems: [{
270
+ type: Input
271
+ }] } });
272
+
273
+ class OnshoreFormInputItemComponent {
274
+ constructor(ngControl, cdr) {
275
+ this.ngControl = ngControl;
276
+ this.cdr = cdr;
277
+ this.FormTemplateItemType = OnshoreFormTemplateType;
278
+ this.passwordVisible = false;
279
+ this.disabled = false;
280
+ this.ngControl.valueAccessor = this;
281
+ }
282
+ // ControlValueAccessor interface
283
+ writeValue(obj) { }
284
+ registerOnChange(fn) { }
285
+ registerOnTouched(fn) { }
286
+ setDisabledState(isDisabled) {
287
+ this.disabled = isDisabled;
288
+ }
289
+ ngOnInit() {
290
+ var _a, _b, _c, _d, _e, _f;
291
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.valueChanges.subscribe(() => {
292
+ this.cdr.markForCheck();
293
+ });
294
+ (_b = this.ngControl.control) === null || _b === void 0 ? void 0 : _b.statusChanges.subscribe(() => {
295
+ this.cdr.markForCheck();
296
+ });
297
+ if (((_c = this.ngControl.control) === null || _c === void 0 ? void 0 : _c.value) == '' && this.formTemplate.default != undefined) {
298
+ (_d = this.ngControl.control) === null || _d === void 0 ? void 0 : _d.setValue(this.formTemplate.default);
299
+ this.cdr.markForCheck();
300
+ }
301
+ if (this.formTemplate.enabled) {
302
+ (_e = this.ngControl.control) === null || _e === void 0 ? void 0 : _e.enable();
303
+ }
304
+ else {
305
+ (_f = this.ngControl.control) === null || _f === void 0 ? void 0 : _f.disable();
306
+ }
307
+ }
308
+ ngOnChanges(changes) {
309
+ this.cdr.markForCheck();
310
+ }
311
+ ngOnDestroy() {
312
+ var _a;
313
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.disable();
314
+ }
315
+ }
316
+ OnshoreFormInputItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormInputItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
317
+ OnshoreFormInputItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormInputItemComponent, selector: "onshore-form-input-item", inputs: { formTemplate: "formTemplate" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-column mb-3\">\n <div class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate.label}}\n <span *ngIf=\"formTemplate.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <span class=\"p-inputgroup w-100\">\n\n <container-element [ngSwitch]=\"formTemplate.type\" class=\"w-100\" style=\"width: 100%\">\n\n <input *ngSwitchDefault\n class=\"w-100\"\n type=\"text\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n pInputText\n [formControl]=\"ngControl.control\"\n [class.p-invalid]=\"ngControl.control.touched && ngControl.control.invalid\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"/>\n\n <input *ngSwitchCase=\"'password'\"\n class=\"w-100\"\n [type]=\"passwordVisible ? 'text' : formTemplate.type\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n pInputText\n [formControl]=\"ngControl.control\"\n [class.p-invalid]=\"ngControl.control.touched && ngControl.control.invalid\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"/>\n\n <p-inputNumber *ngSwitchCase=\"'number'\"\n class=\"w-100\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? 0\"\n [formControl]=\"ngControl.control\"\n [class.p-invalid]=\"ngControl.control.touched && ngControl.control.invalid\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [step]=\"formTemplate.settings?.step ?? 1\"\n [min]=\"formTemplate.settings?.min ?? null\"\n [max]=\"formTemplate.settings?.max ?? null\">\n </p-inputNumber>\n <!--\n [showButtons]=\"true\"\n buttonLayout=\"horizontal\"\n spinnerMode=\"horizontal\"\n decrementButtonClass=\"p-button-outlined text-black-50\"\n incrementButtonClass=\"p-button-outlined text-black-50\"\n -->\n </container-element>\n\n <span class=\"p-inputgroup-addon\">\n <i *ngIf=\"formTemplate.type != FormTemplateItemType.password\" class=\"fa\"\n [class.tl-color-black]=\"ngControl.control.untouched\"\n [class.fa-check]=\"formTemplate.required && ngControl.control.valid\"\n [class.tl-color-primary1]=\"ngControl.control.touched && ngControl.control.valid\"\n [class.fa-exclamation-triangle]=\"ngControl.control.touched && ngControl.control.invalid\"\n [class.tl-color-danger]=\"ngControl.control.touched && ngControl.control.invalid\"\n ></i>\n <i *ngIf=\"formTemplate.type == FormTemplateItemType.password\" class=\"fa tl-color-black\"\n [class.fa-eye-slash]=\"passwordVisible\"\n [class.fa-eye]=\"!passwordVisible\"\n (click)=\"passwordVisible = !passwordVisible\"\n ></i>\n </span>\n\n </span>\n\n <small *ngIf=\"formTemplate.description\"><i class=\"fa fa-info-circle\"></i> {{formTemplate.description}}</small>\n\n <div *ngIf=\"ngControl.control.touched\">\n <onshore-form-validation-output\n [validationItems]=\"formTemplate.validationItems\"\n [validationErrors]=\"ngControl.control.errors\"\n [externValidationPattern]=\"formTemplate.validationPatternTranslation\">\n </onshore-form-validation-output>\n </div>\n\n</div>\n", styles: [".p-inputtext{border-color:var(--color-primary)!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "fitContent", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i4.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i5.InputText, selector: "[pInputText]" }, { kind: "component", type: OnshoreFormValidationOutputComponent, selector: "onshore-form-validation-output", inputs: ["validationErrors", "externValidationPattern", "validationItems"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormInputItemComponent, decorators: [{
319
+ type: Component,
320
+ args: [{ selector: 'onshore-form-input-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-column mb-3\">\n <div class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate.label}}\n <span *ngIf=\"formTemplate.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <span class=\"p-inputgroup w-100\">\n\n <container-element [ngSwitch]=\"formTemplate.type\" class=\"w-100\" style=\"width: 100%\">\n\n <input *ngSwitchDefault\n class=\"w-100\"\n type=\"text\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n pInputText\n [formControl]=\"ngControl.control\"\n [class.p-invalid]=\"ngControl.control.touched && ngControl.control.invalid\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"/>\n\n <input *ngSwitchCase=\"'password'\"\n class=\"w-100\"\n [type]=\"passwordVisible ? 'text' : formTemplate.type\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n pInputText\n [formControl]=\"ngControl.control\"\n [class.p-invalid]=\"ngControl.control.touched && ngControl.control.invalid\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"/>\n\n <p-inputNumber *ngSwitchCase=\"'number'\"\n class=\"w-100\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? 0\"\n [formControl]=\"ngControl.control\"\n [class.p-invalid]=\"ngControl.control.touched && ngControl.control.invalid\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [step]=\"formTemplate.settings?.step ?? 1\"\n [min]=\"formTemplate.settings?.min ?? null\"\n [max]=\"formTemplate.settings?.max ?? null\">\n </p-inputNumber>\n <!--\n [showButtons]=\"true\"\n buttonLayout=\"horizontal\"\n spinnerMode=\"horizontal\"\n decrementButtonClass=\"p-button-outlined text-black-50\"\n incrementButtonClass=\"p-button-outlined text-black-50\"\n -->\n </container-element>\n\n <span class=\"p-inputgroup-addon\">\n <i *ngIf=\"formTemplate.type != FormTemplateItemType.password\" class=\"fa\"\n [class.tl-color-black]=\"ngControl.control.untouched\"\n [class.fa-check]=\"formTemplate.required && ngControl.control.valid\"\n [class.tl-color-primary1]=\"ngControl.control.touched && ngControl.control.valid\"\n [class.fa-exclamation-triangle]=\"ngControl.control.touched && ngControl.control.invalid\"\n [class.tl-color-danger]=\"ngControl.control.touched && ngControl.control.invalid\"\n ></i>\n <i *ngIf=\"formTemplate.type == FormTemplateItemType.password\" class=\"fa tl-color-black\"\n [class.fa-eye-slash]=\"passwordVisible\"\n [class.fa-eye]=\"!passwordVisible\"\n (click)=\"passwordVisible = !passwordVisible\"\n ></i>\n </span>\n\n </span>\n\n <small *ngIf=\"formTemplate.description\"><i class=\"fa fa-info-circle\"></i> {{formTemplate.description}}</small>\n\n <div *ngIf=\"ngControl.control.touched\">\n <onshore-form-validation-output\n [validationItems]=\"formTemplate.validationItems\"\n [validationErrors]=\"ngControl.control.errors\"\n [externValidationPattern]=\"formTemplate.validationPatternTranslation\">\n </onshore-form-validation-output>\n </div>\n\n</div>\n", styles: [".p-inputtext{border-color:var(--color-primary)!important}\n"] }]
321
+ }], ctorParameters: function () {
322
+ return [{ type: i1$1.NgControl, decorators: [{
323
+ type: Self
324
+ }, {
325
+ type: Optional
326
+ }] }, { type: i0.ChangeDetectorRef }];
327
+ }, propDecorators: { formTemplate: [{
328
+ type: Input
329
+ }] } });
330
+
331
+ class OnshoreFormSwitchItemComponent {
332
+ constructor(ngControl, cdr) {
333
+ this.ngControl = ngControl;
334
+ this.cdr = cdr;
335
+ this.valueChange = new EventEmitter();
336
+ this.disabled = false;
337
+ this.ngControl.valueAccessor = this;
338
+ }
339
+ // ControlValueAccessor interface
340
+ writeValue(obj) { }
341
+ registerOnChange(fn) { }
342
+ registerOnTouched(fn) { }
343
+ setDisabledState(isDisabled) {
344
+ this.disabled = isDisabled;
345
+ }
346
+ ngOnInit() {
347
+ var _a, _b, _c, _d, _e, _f, _g;
348
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.valueChanges.pipe(debounceTime(100), distinctUntilChanged(), skip(1)).subscribe(newValue => {
349
+ var _a;
350
+ this.valueChange.emit((_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.value);
351
+ });
352
+ (_b = this.ngControl.control) === null || _b === void 0 ? void 0 : _b.valueChanges.subscribe(() => {
353
+ this.cdr.markForCheck();
354
+ });
355
+ (_c = this.ngControl.control) === null || _c === void 0 ? void 0 : _c.statusChanges.subscribe(() => {
356
+ this.cdr.markForCheck();
357
+ });
358
+ if (((_d = this.ngControl.control) === null || _d === void 0 ? void 0 : _d.value) == undefined && this.formTemplate.default != undefined) {
359
+ (_e = this.ngControl.control) === null || _e === void 0 ? void 0 : _e.setValue(this.formTemplate.default);
360
+ this.cdr.markForCheck();
361
+ }
362
+ if (this.formTemplate.enabled) {
363
+ (_f = this.ngControl.control) === null || _f === void 0 ? void 0 : _f.enable();
364
+ }
365
+ else {
366
+ (_g = this.ngControl.control) === null || _g === void 0 ? void 0 : _g.disable();
367
+ }
368
+ }
369
+ ngOnChanges(changes) {
370
+ this.cdr.markForCheck();
371
+ }
372
+ ngOnDestroy() {
373
+ var _a;
374
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.disable();
375
+ }
376
+ }
377
+ OnshoreFormSwitchItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormSwitchItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
378
+ OnshoreFormSwitchItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormSwitchItemComponent, selector: "onshore-form-switch-item", inputs: { formTemplate: "formTemplate" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-column pt-1\">\n <div class=\"flex justify-content-between align-items-center\">\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <p-inputSwitch [name]=\"formTemplate.name\" [formControl]=\"ngControl.control\" [inputId]=\"formTemplate.name\"></p-inputSwitch>\n\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "fitContent", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i4$1.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
379
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormSwitchItemComponent, decorators: [{
380
+ type: Component,
381
+ args: [{ selector: 'onshore-form-switch-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-column pt-1\">\n <div class=\"flex justify-content-between align-items-center\">\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <p-inputSwitch [name]=\"formTemplate.name\" [formControl]=\"ngControl.control\" [inputId]=\"formTemplate.name\"></p-inputSwitch>\n\n</div>\n" }]
382
+ }], ctorParameters: function () {
383
+ return [{ type: i1$1.NgControl, decorators: [{
384
+ type: Self
385
+ }, {
386
+ type: Optional
387
+ }] }, { type: i0.ChangeDetectorRef }];
388
+ }, propDecorators: { formTemplate: [{
389
+ type: Input
390
+ }], valueChange: [{
391
+ type: Output
392
+ }] } });
393
+
394
+ class OnshoreFormTextareaItemComponent {
395
+ constructor(ngControl, cdr) {
396
+ this.ngControl = ngControl;
397
+ this.cdr = cdr;
398
+ this.FormTemplateItemType = OnshoreFormTemplateType;
399
+ this.disabled = false;
400
+ this.ngControl.valueAccessor = this;
401
+ }
402
+ // ControlValueAccessor interface
403
+ writeValue(obj) { }
404
+ registerOnChange(fn) { }
405
+ registerOnTouched(fn) { }
406
+ setDisabledState(isDisabled) {
407
+ this.disabled = isDisabled;
408
+ }
409
+ ngOnInit() {
410
+ var _a, _b, _c, _d, _e, _f;
411
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.valueChanges.subscribe(() => {
412
+ this.cdr.markForCheck();
413
+ });
414
+ (_b = this.ngControl.control) === null || _b === void 0 ? void 0 : _b.statusChanges.subscribe(() => {
415
+ this.cdr.markForCheck();
416
+ });
417
+ if (((_c = this.ngControl.control) === null || _c === void 0 ? void 0 : _c.value) == '' && this.formTemplate.default != undefined) {
418
+ (_d = this.ngControl.control) === null || _d === void 0 ? void 0 : _d.setValue(this.formTemplate.default);
419
+ this.cdr.markForCheck();
420
+ }
421
+ if (this.formTemplate.enabled) {
422
+ (_e = this.ngControl.control) === null || _e === void 0 ? void 0 : _e.enable();
423
+ }
424
+ else {
425
+ (_f = this.ngControl.control) === null || _f === void 0 ? void 0 : _f.disable();
426
+ }
427
+ }
428
+ ngOnDestroy() {
429
+ var _a;
430
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.disable();
431
+ }
432
+ ngOnChanges(changes) {
433
+ this.cdr.markForCheck();
434
+ }
435
+ }
436
+ OnshoreFormTextareaItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormTextareaItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
437
+ OnshoreFormTextareaItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormTextareaItemComponent, selector: "onshore-form-textarea-item", inputs: { formTemplate: "formTemplate" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-column mb-3\">\n <div class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate.label}}\n <span *ngIf=\"formTemplate.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <span class=\"p-input-icon-right\">\n <i class=\"fa\"\n [class.tl-color-black]=\"ngControl.control?.untouched\"\n [class.fa-check]=\"ngControl.control?.touched && ngControl.control?.valid\"\n [class.text-primary]=\"ngControl.control?.touched && ngControl.control?.valid\"\n [class.fa-exclamation-triangle]=\"ngControl.control?.touched && ngControl.control?.invalid\"\n [class.tl-color-danger]=\"ngControl.control?.touched && ngControl.control?.invalid\"\n ></i>\n <textarea class=\"w-100\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.label\"\n [rows]=\"3\"\n [cols]=\"30\"\n pInputTextarea\n [autoResize]=\"true\"\n [formControl]=\"ngControl.control\"\n [class.p-invalid]=\"ngControl.control?.touched && ngControl.control?.invalid\"></textarea>\n </span>\n\n <small *ngIf=\"formTemplate.description\"><i class=\"fa fa-info-circle\"></i> {{formTemplate.description}}</small>\n\n <div *ngIf=\"ngControl.control?.touched\">\n <onshore-form-validation-output\n [validationItems]=\"formTemplate.validationItems\"\n [validationErrors]=\"ngControl.control?.errors\"\n [externValidationPattern]=\"formTemplate.validationPatternTranslation\">\n </onshore-form-validation-output>\n </div>\n\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "fitContent", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i4$2.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { kind: "component", type: OnshoreFormValidationOutputComponent, selector: "onshore-form-validation-output", inputs: ["validationErrors", "externValidationPattern", "validationItems"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormTextareaItemComponent, decorators: [{
439
+ type: Component,
440
+ args: [{ selector: 'onshore-form-textarea-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-column mb-3\">\n <div class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate.label}}\n <span *ngIf=\"formTemplate.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <span class=\"p-input-icon-right\">\n <i class=\"fa\"\n [class.tl-color-black]=\"ngControl.control?.untouched\"\n [class.fa-check]=\"ngControl.control?.touched && ngControl.control?.valid\"\n [class.text-primary]=\"ngControl.control?.touched && ngControl.control?.valid\"\n [class.fa-exclamation-triangle]=\"ngControl.control?.touched && ngControl.control?.invalid\"\n [class.tl-color-danger]=\"ngControl.control?.touched && ngControl.control?.invalid\"\n ></i>\n <textarea class=\"w-100\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.label\"\n [rows]=\"3\"\n [cols]=\"30\"\n pInputTextarea\n [autoResize]=\"true\"\n [formControl]=\"ngControl.control\"\n [class.p-invalid]=\"ngControl.control?.touched && ngControl.control?.invalid\"></textarea>\n </span>\n\n <small *ngIf=\"formTemplate.description\"><i class=\"fa fa-info-circle\"></i> {{formTemplate.description}}</small>\n\n <div *ngIf=\"ngControl.control?.touched\">\n <onshore-form-validation-output\n [validationItems]=\"formTemplate.validationItems\"\n [validationErrors]=\"ngControl.control?.errors\"\n [externValidationPattern]=\"formTemplate.validationPatternTranslation\">\n </onshore-form-validation-output>\n </div>\n\n</div>\n" }]
441
+ }], ctorParameters: function () {
442
+ return [{ type: i1$1.NgControl, decorators: [{
443
+ type: Self
444
+ }, {
445
+ type: Optional
446
+ }] }, { type: i0.ChangeDetectorRef }];
447
+ }, propDecorators: { formTemplate: [{
448
+ type: Input
449
+ }] } });
450
+
451
+ class OnshoreFormImageItemComponent {
452
+ constructor(cdr, ngControl, dialogService, translate) {
453
+ this.cdr = cdr;
454
+ this.ngControl = ngControl;
455
+ this.dialogService = dialogService;
456
+ this.translate = translate;
457
+ this.inverseColor = false;
458
+ // Image updload params
459
+ this.imageWidth = 400;
460
+ this.imageHeight = 400;
461
+ this.containWithinAspectRatio = false;
462
+ this.aspectRatio = 1 / 1;
463
+ this.imageDeleted = new EventEmitter();
464
+ this.imageCleared = new EventEmitter();
465
+ this.imageSelectedFromMedia = new EventEmitter();
466
+ this.image = '';
467
+ this.disabled = false;
468
+ this.webcamDialogVisible = false;
469
+ this.imageChooserDialogVisible = false;
470
+ this.subscriptions = [];
471
+ this.ngControl.valueAccessor = this;
472
+ }
473
+ getFileImage(image) {
474
+ this.imageChooserDialogVisible = false;
475
+ if (image) {
476
+ this.image = image;
477
+ setTimeout(() => {
478
+ var _a, _b, _c, _d;
479
+ this.cdr.markForCheck();
480
+ (_b = (_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.control) === null || _b === void 0 ? void 0 : _b.setValue(this.image);
481
+ (_d = (_c = this.ngControl) === null || _c === void 0 ? void 0 : _c.control) === null || _d === void 0 ? void 0 : _d.markAsDirty();
482
+ }, 500);
483
+ }
484
+ }
485
+ getWebcamImage(image) {
486
+ this.webcamDialogVisible = false;
487
+ if (image) {
488
+ this.image = image;
489
+ setTimeout(() => {
490
+ var _a, _b, _c, _d;
491
+ this.cdr.markForCheck();
492
+ (_b = (_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.control) === null || _b === void 0 ? void 0 : _b.setValue(this.image);
493
+ (_d = (_c = this.ngControl) === null || _c === void 0 ? void 0 : _c.control) === null || _d === void 0 ? void 0 : _d.markAsDirty();
494
+ }, 500);
495
+ }
496
+ }
497
+ /*searchMedia() {
498
+ this.dialogService.open(SearchMediaComponent,{
499
+ styleClass: 'p-dialog-background-white',
500
+ modal: true,
501
+ header: this.translate.instant('search.media.dialogTitle'),
502
+ data: { targetType: this.formSettings.mediaType }
503
+ }).onClose.subscribe((result) => {
504
+ if(result) {
505
+ this.image = result.url;
506
+ setTimeout(() => {
507
+ this.cdr.markForCheck();
508
+ this.ngControl?.control?.setValue(this.image);
509
+ this.ngControl?.control?.markAsDirty();
510
+ this.imageSelectedFromMedia.next(result);
511
+ }, 500);
512
+ }
513
+ });
514
+ }*/
515
+ removeImage() {
516
+ var _a, _b, _c, _d;
517
+ if (this.image && !this.image.includes('base64')) {
518
+ this.imageDeleted.emit(this.image);
519
+ }
520
+ else {
521
+ this.imageCleared.emit();
522
+ }
523
+ (_b = (_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.control) === null || _b === void 0 ? void 0 : _b.setValue(null);
524
+ (_d = (_c = this.ngControl) === null || _c === void 0 ? void 0 : _c.control) === null || _d === void 0 ? void 0 : _d.markAsDirty();
525
+ this.image = '';
526
+ }
527
+ writeValue(obj) {
528
+ if (obj && !obj.includes('base64')) {
529
+ this.image = obj;
530
+ }
531
+ if (obj == null) {
532
+ this.image = '';
533
+ }
534
+ this.cdr.markForCheck();
535
+ }
536
+ registerOnChange(fn) {
537
+ if (this.ngControl.value) {
538
+ this.image = this.ngControl.value;
539
+ this.cdr.markForCheck();
540
+ }
541
+ }
542
+ registerOnTouched(fn) { }
543
+ setDisabledState(isDisabled) {
544
+ this.disabled = isDisabled;
545
+ this.cdr.markForCheck();
546
+ }
547
+ ngOnInit() {
548
+ this.ngControl.control.valueChanges.subscribe((value) => {
549
+ this.cdr.markForCheck();
550
+ });
551
+ this.ngControl.control.statusChanges.subscribe((status) => {
552
+ this.cdr.markForCheck();
553
+ });
554
+ if (this.ngControl.control.value == '' && this.formTemplate.default != undefined) {
555
+ this.ngControl.control.setValue(this.formTemplate.default);
556
+ this.cdr.markForCheck();
557
+ }
558
+ if (this.formTemplate.enabled) {
559
+ this.ngControl.control.enable();
560
+ }
561
+ else {
562
+ this.ngControl.control.disable();
563
+ }
564
+ if (this.formTemplate.settings) {
565
+ this.formSettings = this.formTemplate.settings;
566
+ }
567
+ }
568
+ ngOnDestroy() {
569
+ this.subscriptions.forEach((subscription) => {
570
+ subscription.unsubscribe();
571
+ });
572
+ this.ngControl.control.disable();
573
+ this.image = null;
574
+ }
575
+ }
576
+ OnshoreFormImageItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormImageItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.NgControl, optional: true, self: true }, { token: i2$1.DialogService }, { token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
577
+ OnshoreFormImageItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormImageItemComponent, selector: "onshore-form-image-item", inputs: { formTemplate: "formTemplate", inverseColor: "inverseColor", imageWidth: "imageWidth", imageHeight: "imageHeight", containWithinAspectRatio: "containWithinAspectRatio", aspectRatio: "aspectRatio" }, outputs: { imageDeleted: "imageDeleted", imageCleared: "imageCleared", imageSelectedFromMedia: "imageSelectedFromMedia" }, ngImport: i0, template: "<div class=\"flex flex-column mb-3\" style=\"max-width: 500px\">\n <div class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate.label}}\n <span *ngIf=\"formTemplate.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <div class=\"w-100\">\n\n <div class=\"position-relative flex justify-content-center align-items-center\" style=\"background-color: white\">\n <!--<app-image-placeholder class=\"w-100\" [image]=\"image\" imageStyle=\"position: absolut; height: 250px; width: 250px\" [placeholder]=\"formSettings?.imagePlaceholder ? formSettings?.imagePlaceholder + ' fa-10x' : 'fa-image fa-10x'\" placeholderStyle=\"width: 250px; height: 250px\"></app-image-placeholder>-->\n </div>\n\n <div class=\"flex flex-column mt-4 w-100\">\n <button pButton pRipple type=\"button\"\n [hidden]=\"formSettings?.disableImageSelection\"\n icon=\"fa fa-image\"\n label=\"Bild hochladen\"\n class=\"p-button-rounded p-button-outlined text-secondary mb-2\"\n [disabled]=\"disabled\"\n (click)=\"imageChooserDialogVisible = true\">\n </button>\n\n <button pButton pRipple type=\"button\"\n [hidden]=\"formSettings?.disableWebcamSelection\"\n icon=\"fa fa-camera\"\n label=\"Foto aufnehmen\"\n class=\"p-button-rounded p-button-outlined text-secondary mb-2\"\n [disabled]=\"disabled\"\n (click)=\"webcamDialogVisible = true\">\n </button>\n\n <!--<button pButton pRipple type=\"button\"\n [hidden]=\"formSettings?.disableMediaSelection\"\n icon=\"fa fa-photo-video\"\n label=\"Medienverwaltung\"\n class=\"p-button-rounded p-button-outlined text-secondary mb-2\"\n [disabled]=\"disabled\"\n (click)=\"searchMedia()\">\n </button>-->\n\n <button pButton pRipple type=\"button\"\n [hidden]=\"formSettings?.disableDelete\"\n icon=\"fa fa-eraser\"\n label=\"Entfernen\"\n (click)=\"removeImage()\"\n [disabled]=\"!image || disabled\"\n class=\"p-button-rounded p-button-outlined text-secondary\">\n </button>\n\n </div>\n\n </div>\n\n <small *ngIf=\"formTemplate.description\"><i class=\"fa fa-info-circle\"></i> {{formTemplate.description}}</small>\n\n</div>\n\n<!--\n<p-dialog [header]=\"'Bild ausw\u00E4hlen'\" [(visible)]=\"imageChooserDialogVisible\" [modal]=\"true\" [style]=\"{'max-width': '50vw'}\">\n <app-image-chooser buttonLabel=\"Ausw\u00E4hlen\"\n (choosen)=\"getFileImage($event)\"\n (canceled)=\"imageChooserDialogVisible = false\"\n [inverseColor]=\"inverseColor\"\n [resizeToWidth]=\"imageWidth\"\n [resizeToHeight]=\"imageHeight\"\n [containWithinAspectRatio]=\"containWithinAspectRatio\"\n [aspectRatio]=\"aspectRatio\"\n backgroundColor=\"transparent\"></app-image-chooser>\n</p-dialog>\n-->\n\n<!--\n<p-dialog [header]=\"'Foto aufnehmen'\" [(visible)]=\"webcamDialogVisible\" [modal]=\"true\" [style]=\"{'max-width': '50vw'}\">\n <app-webcam *ngIf=\"webcamDialogVisible\" buttonLabel=\"Smile\" (shot)=\"getWebcamImage($event)\" (canceled)=\"webcamDialogVisible = false\" [inverseColor]=\"inverseColor\"></app-webcam>\n</p-dialog>\n-->\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i6.Ripple, selector: "[pRipple]" }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "fitContent", "pTooltip", "tooltipDisabled", "tooltipOptions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
578
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormImageItemComponent, decorators: [{
579
+ type: Component,
580
+ args: [{ selector: 'onshore-form-image-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-column mb-3\" style=\"max-width: 500px\">\n <div class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate.label}}\n <span *ngIf=\"formTemplate.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <div class=\"w-100\">\n\n <div class=\"position-relative flex justify-content-center align-items-center\" style=\"background-color: white\">\n <!--<app-image-placeholder class=\"w-100\" [image]=\"image\" imageStyle=\"position: absolut; height: 250px; width: 250px\" [placeholder]=\"formSettings?.imagePlaceholder ? formSettings?.imagePlaceholder + ' fa-10x' : 'fa-image fa-10x'\" placeholderStyle=\"width: 250px; height: 250px\"></app-image-placeholder>-->\n </div>\n\n <div class=\"flex flex-column mt-4 w-100\">\n <button pButton pRipple type=\"button\"\n [hidden]=\"formSettings?.disableImageSelection\"\n icon=\"fa fa-image\"\n label=\"Bild hochladen\"\n class=\"p-button-rounded p-button-outlined text-secondary mb-2\"\n [disabled]=\"disabled\"\n (click)=\"imageChooserDialogVisible = true\">\n </button>\n\n <button pButton pRipple type=\"button\"\n [hidden]=\"formSettings?.disableWebcamSelection\"\n icon=\"fa fa-camera\"\n label=\"Foto aufnehmen\"\n class=\"p-button-rounded p-button-outlined text-secondary mb-2\"\n [disabled]=\"disabled\"\n (click)=\"webcamDialogVisible = true\">\n </button>\n\n <!--<button pButton pRipple type=\"button\"\n [hidden]=\"formSettings?.disableMediaSelection\"\n icon=\"fa fa-photo-video\"\n label=\"Medienverwaltung\"\n class=\"p-button-rounded p-button-outlined text-secondary mb-2\"\n [disabled]=\"disabled\"\n (click)=\"searchMedia()\">\n </button>-->\n\n <button pButton pRipple type=\"button\"\n [hidden]=\"formSettings?.disableDelete\"\n icon=\"fa fa-eraser\"\n label=\"Entfernen\"\n (click)=\"removeImage()\"\n [disabled]=\"!image || disabled\"\n class=\"p-button-rounded p-button-outlined text-secondary\">\n </button>\n\n </div>\n\n </div>\n\n <small *ngIf=\"formTemplate.description\"><i class=\"fa fa-info-circle\"></i> {{formTemplate.description}}</small>\n\n</div>\n\n<!--\n<p-dialog [header]=\"'Bild ausw\u00E4hlen'\" [(visible)]=\"imageChooserDialogVisible\" [modal]=\"true\" [style]=\"{'max-width': '50vw'}\">\n <app-image-chooser buttonLabel=\"Ausw\u00E4hlen\"\n (choosen)=\"getFileImage($event)\"\n (canceled)=\"imageChooserDialogVisible = false\"\n [inverseColor]=\"inverseColor\"\n [resizeToWidth]=\"imageWidth\"\n [resizeToHeight]=\"imageHeight\"\n [containWithinAspectRatio]=\"containWithinAspectRatio\"\n [aspectRatio]=\"aspectRatio\"\n backgroundColor=\"transparent\"></app-image-chooser>\n</p-dialog>\n-->\n\n<!--\n<p-dialog [header]=\"'Foto aufnehmen'\" [(visible)]=\"webcamDialogVisible\" [modal]=\"true\" [style]=\"{'max-width': '50vw'}\">\n <app-webcam *ngIf=\"webcamDialogVisible\" buttonLabel=\"Smile\" (shot)=\"getWebcamImage($event)\" (canceled)=\"webcamDialogVisible = false\" [inverseColor]=\"inverseColor\"></app-webcam>\n</p-dialog>\n-->\n" }]
581
+ }], ctorParameters: function () {
582
+ return [{ type: i0.ChangeDetectorRef }, { type: i1$1.NgControl, decorators: [{
583
+ type: Self
584
+ }, {
585
+ type: Optional
586
+ }] }, { type: i2$1.DialogService }, { type: i1.TranslateService }];
587
+ }, propDecorators: { formTemplate: [{
588
+ type: Input
589
+ }], inverseColor: [{
590
+ type: Input
591
+ }], imageWidth: [{
592
+ type: Input
593
+ }], imageHeight: [{
594
+ type: Input
595
+ }], containWithinAspectRatio: [{
596
+ type: Input
597
+ }], aspectRatio: [{
598
+ type: Input
599
+ }], imageDeleted: [{
600
+ type: Output
601
+ }], imageCleared: [{
602
+ type: Output
603
+ }], imageSelectedFromMedia: [{
604
+ type: Output
605
+ }] } });
606
+
607
+ class OnshoreFormDropdownItemComponent {
608
+ constructor(ngControl, cdr) {
609
+ this.ngControl = ngControl;
610
+ this.cdr = cdr;
611
+ this.disabled = false;
612
+ this.multiple = false;
613
+ this.ngControl.valueAccessor = this;
614
+ }
615
+ // ControlValueAccessor interface
616
+ writeValue(obj) { }
617
+ registerOnChange(fn) { }
618
+ registerOnTouched(fn) { }
619
+ setDisabledState(isDisabled) {
620
+ this.disabled = isDisabled;
621
+ }
622
+ clearSelection() {
623
+ var _a;
624
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.setValue(null);
625
+ }
626
+ ngOnInit() {
627
+ var _a, _b, _c, _d, _e, _f, _g;
628
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.valueChanges.subscribe(() => {
629
+ this.cdr.markForCheck();
630
+ });
631
+ (_b = this.ngControl.control) === null || _b === void 0 ? void 0 : _b.statusChanges.subscribe(() => {
632
+ this.cdr.markForCheck();
633
+ });
634
+ if (((_c = this.ngControl.control) === null || _c === void 0 ? void 0 : _c.value) == '' && this.formTemplate.default != undefined) {
635
+ (_d = this.ngControl.control) === null || _d === void 0 ? void 0 : _d.setValue(this.formTemplate.default);
636
+ this.cdr.markForCheck();
637
+ }
638
+ if (this.formTemplate.enabled) {
639
+ (_e = this.ngControl.control) === null || _e === void 0 ? void 0 : _e.enable();
640
+ }
641
+ else {
642
+ (_f = this.ngControl.control) === null || _f === void 0 ? void 0 : _f.disable();
643
+ }
644
+ this.multiple = (_g = this.formTemplate.settings) === null || _g === void 0 ? void 0 : _g.multiple;
645
+ }
646
+ ngOnDestroy() {
647
+ var _a;
648
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.disable();
649
+ }
650
+ ngOnChanges(changes) {
651
+ this.cdr.markForCheck();
652
+ }
653
+ }
654
+ OnshoreFormDropdownItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormDropdownItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
655
+ OnshoreFormDropdownItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormDropdownItemComponent, selector: "onshore-form-dropdown-item", inputs: { formTemplate: "formTemplate" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-column mb-3\">\n <div class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate?.label}}\n <span *ngIf=\"formTemplate?.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate?.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate?.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <p-dropdown *ngIf=\"!multiple\"\n class=\"w-100\"\n [options]=\"formTemplate?.options\"\n [formControl]=\"ngControl.control\"\n [name]=\"formTemplate?.name\"\n [placeholder]=\"formTemplate?.placeholder\"\n [disabled]=\"disabled\"\n [dataKey]=\"formTemplate?.optionDataKey\"\n [showClear]=\"formTemplate?.settings?.showClear\"\n (onClear)=\"clearSelection()\"\n optionDisabled=\"disabled\"\n appendTo=\"body\">\n </p-dropdown>\n\n <p-multiSelect *ngIf=\"multiple\"\n class=\"w-100\"\n [options]=\"formTemplate?.options\"\n [formControl]=\"ngControl.control\"\n [name]=\"formTemplate?.name\"\n [placeholder]=\"formTemplate?.placeholder\"\n [disabled]=\"disabled\"\n [dataKey]=\"formTemplate?.optionDataKey\"\n display=\"chip\"\n optionDisabled=\"disabled\"\n appendTo=\"body\"></p-multiSelect>\n\n <div *ngIf=\"ngControl.control.touched\">\n <onshore-form-validation-output\n [validationItems]=\"formTemplate.validationItems\"\n [validationErrors]=\"ngControl.control.errors\"\n [externValidationPattern]=\"formTemplate?.validationPatternTranslation\">\n </onshore-form-validation-output>\n </div>\n\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3$1.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "itemSize", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i4$3.MultiSelect, selector: "p-multiSelect", inputs: ["style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "label", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "autoZIndex", "baseZIndex", "filterBy", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "defaultLabel", "placeholder", "options", "filterValue", "itemSize"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad"] }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "fitContent", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: OnshoreFormValidationOutputComponent, selector: "onshore-form-validation-output", inputs: ["validationErrors", "externValidationPattern", "validationItems"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
656
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormDropdownItemComponent, decorators: [{
657
+ type: Component,
658
+ args: [{ selector: 'onshore-form-dropdown-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-column mb-3\">\n <div class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate?.label}}\n <span *ngIf=\"formTemplate?.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate?.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate?.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <p-dropdown *ngIf=\"!multiple\"\n class=\"w-100\"\n [options]=\"formTemplate?.options\"\n [formControl]=\"ngControl.control\"\n [name]=\"formTemplate?.name\"\n [placeholder]=\"formTemplate?.placeholder\"\n [disabled]=\"disabled\"\n [dataKey]=\"formTemplate?.optionDataKey\"\n [showClear]=\"formTemplate?.settings?.showClear\"\n (onClear)=\"clearSelection()\"\n optionDisabled=\"disabled\"\n appendTo=\"body\">\n </p-dropdown>\n\n <p-multiSelect *ngIf=\"multiple\"\n class=\"w-100\"\n [options]=\"formTemplate?.options\"\n [formControl]=\"ngControl.control\"\n [name]=\"formTemplate?.name\"\n [placeholder]=\"formTemplate?.placeholder\"\n [disabled]=\"disabled\"\n [dataKey]=\"formTemplate?.optionDataKey\"\n display=\"chip\"\n optionDisabled=\"disabled\"\n appendTo=\"body\"></p-multiSelect>\n\n <div *ngIf=\"ngControl.control.touched\">\n <onshore-form-validation-output\n [validationItems]=\"formTemplate.validationItems\"\n [validationErrors]=\"ngControl.control.errors\"\n [externValidationPattern]=\"formTemplate?.validationPatternTranslation\">\n </onshore-form-validation-output>\n </div>\n\n</div>\n" }]
659
+ }], ctorParameters: function () {
660
+ return [{ type: i1$1.NgControl, decorators: [{
661
+ type: Self
662
+ }, {
663
+ type: Optional
664
+ }] }, { type: i0.ChangeDetectorRef }];
665
+ }, propDecorators: { formTemplate: [{
666
+ type: Input
667
+ }] } });
668
+
669
+ class OnshoreFormColorpickerItemComponent {
670
+ constructor(ngControl, cdr) {
671
+ this.ngControl = ngControl;
672
+ this.cdr = cdr;
673
+ this.disabled = false;
674
+ this.colorPickerValue = '';
675
+ this.ngControl.valueAccessor = this;
676
+ }
677
+ // ControlValueAccessor interface
678
+ writeValue(obj) { }
679
+ registerOnChange(fn) { }
680
+ registerOnTouched(fn) { }
681
+ setDisabledState(isDisabled) {
682
+ this.disabled = isDisabled;
683
+ }
684
+ changeColor() {
685
+ var _a;
686
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.setValue(this.colorPickerValue);
687
+ }
688
+ changeInput(input) {
689
+ var _a;
690
+ this.colorPickerValue = (_a = input.target) === null || _a === void 0 ? void 0 : _a.value;
691
+ }
692
+ ngOnInit() {
693
+ var _a, _b, _c, _d, _e, _f;
694
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.valueChanges.subscribe(() => {
695
+ this.cdr.markForCheck();
696
+ });
697
+ (_b = this.ngControl.control) === null || _b === void 0 ? void 0 : _b.statusChanges.subscribe(() => {
698
+ this.cdr.markForCheck();
699
+ });
700
+ if (((_c = this.ngControl.control) === null || _c === void 0 ? void 0 : _c.value) == '' && this.formTemplate.default != undefined) {
701
+ (_d = this.ngControl.control) === null || _d === void 0 ? void 0 : _d.setValue(this.formTemplate.default);
702
+ this.colorPickerValue = this.formTemplate.default;
703
+ this.cdr.markForCheck();
704
+ }
705
+ if (this.formTemplate.enabled) {
706
+ (_e = this.ngControl.control) === null || _e === void 0 ? void 0 : _e.enable();
707
+ }
708
+ else {
709
+ (_f = this.ngControl.control) === null || _f === void 0 ? void 0 : _f.disable();
710
+ }
711
+ }
712
+ ngOnDestroy() {
713
+ var _a;
714
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.disable();
715
+ }
716
+ ngOnChanges(changes) {
717
+ var _a;
718
+ this.colorPickerValue = (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.value;
719
+ this.cdr.markForCheck();
720
+ }
721
+ }
722
+ OnshoreFormColorpickerItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormColorpickerItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
723
+ OnshoreFormColorpickerItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormColorpickerItemComponent, selector: "onshore-form-colorpicker-item", inputs: { formTemplate: "formTemplate" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-column mb-3\">\n <div class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate.label}}:\n <span *ngIf=\"formTemplate.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <div class=\"flex w-100\">\n <p-colorPicker [(ngModel)]=\"colorPickerValue\" format=\"hex\" [inline]=\"false\" appendTo=\"body\" [baseZIndex]=\"99999\" (onChange)=\"changeColor()\"></p-colorPicker>\n <input class=\"w-100 ml-2\"\n type=\"text\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.label\"\n [formControl]=\"ngControl.control\"\n pInputText\n [value]=\"ngControl.control.value\"\n (input)=\"changeInput($event)\"/>\n </div>\n\n <div *ngIf=\"ngControl.control.touched\">\n <onshore-form-validation-output\n [validationItems]=\"formTemplate.validationItems\"\n [validationErrors]=\"ngControl.control.errors\"\n [externValidationPattern]=\"formTemplate.validationPatternTranslation\">\n </onshore-form-validation-output>\n </div>\n\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3$2.ColorPicker, selector: "p-colorPicker", inputs: ["style", "styleClass", "inline", "format", "appendTo", "disabled", "tabindex", "inputId", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onChange", "onShow", "onHide"] }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "fitContent", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i5.InputText, selector: "[pInputText]" }, { kind: "component", type: OnshoreFormValidationOutputComponent, selector: "onshore-form-validation-output", inputs: ["validationErrors", "externValidationPattern", "validationItems"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
724
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormColorpickerItemComponent, decorators: [{
725
+ type: Component,
726
+ args: [{ selector: 'onshore-form-colorpicker-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-column mb-3\">\n <div class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate.label}}:\n <span *ngIf=\"formTemplate.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <div class=\"flex w-100\">\n <p-colorPicker [(ngModel)]=\"colorPickerValue\" format=\"hex\" [inline]=\"false\" appendTo=\"body\" [baseZIndex]=\"99999\" (onChange)=\"changeColor()\"></p-colorPicker>\n <input class=\"w-100 ml-2\"\n type=\"text\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.label\"\n [formControl]=\"ngControl.control\"\n pInputText\n [value]=\"ngControl.control.value\"\n (input)=\"changeInput($event)\"/>\n </div>\n\n <div *ngIf=\"ngControl.control.touched\">\n <onshore-form-validation-output\n [validationItems]=\"formTemplate.validationItems\"\n [validationErrors]=\"ngControl.control.errors\"\n [externValidationPattern]=\"formTemplate.validationPatternTranslation\">\n </onshore-form-validation-output>\n </div>\n\n</div>\n" }]
727
+ }], ctorParameters: function () {
728
+ return [{ type: i1$1.NgControl, decorators: [{
729
+ type: Self
730
+ }, {
731
+ type: Optional
732
+ }] }, { type: i0.ChangeDetectorRef }];
733
+ }, propDecorators: { formTemplate: [{
734
+ type: Input
735
+ }] } });
736
+
737
+ class OnshoreFormCheckboxItemComponent {
738
+ constructor(ngControl, cdr) {
739
+ this.ngControl = ngControl;
740
+ this.cdr = cdr;
741
+ this.disabled = false;
742
+ this.ngControl.valueAccessor = this;
743
+ }
744
+ // ControlValueAccessor interface
745
+ writeValue(obj) { }
746
+ registerOnChange(fn) { }
747
+ registerOnTouched(fn) { }
748
+ setDisabledState(isDisabled) {
749
+ this.disabled = isDisabled;
750
+ }
751
+ changeCheck(value) {
752
+ var _a;
753
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.setValue(value.checked);
754
+ }
755
+ ngOnInit() {
756
+ var _a, _b, _c, _d, _e, _f, _g;
757
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.valueChanges.subscribe(() => {
758
+ this.cdr.markForCheck();
759
+ });
760
+ (_b = this.ngControl.control) === null || _b === void 0 ? void 0 : _b.statusChanges.subscribe(() => {
761
+ this.cdr.markForCheck();
762
+ });
763
+ if (((_c = this.ngControl.control) === null || _c === void 0 ? void 0 : _c.value) !== true && ((_d = this.ngControl.control) === null || _d === void 0 ? void 0 : _d.value) !== false && this.formTemplate.default != undefined) {
764
+ (_e = this.ngControl.control) === null || _e === void 0 ? void 0 : _e.setValue(this.formTemplate.default);
765
+ this.cdr.markForCheck();
766
+ }
767
+ if (this.formTemplate.enabled) {
768
+ (_f = this.ngControl.control) === null || _f === void 0 ? void 0 : _f.enable();
769
+ }
770
+ else {
771
+ (_g = this.ngControl.control) === null || _g === void 0 ? void 0 : _g.disable();
772
+ }
773
+ }
774
+ ngOnChanges(changes) {
775
+ this.cdr.markForCheck();
776
+ }
777
+ ngOnDestroy() {
778
+ var _a;
779
+ (_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.disable();
780
+ }
781
+ }
782
+ OnshoreFormCheckboxItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormCheckboxItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
783
+ OnshoreFormCheckboxItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormCheckboxItemComponent, selector: "onshore-form-checkbox-item", inputs: { formTemplate: "formTemplate" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-column mb-3\">\n <div class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate.label}}\n <span *ngIf=\"formTemplate.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <div class=\"p-field-checkbox flex\">\n <p-checkbox class=\"align-self-start mt-1\" [name]=\"formTemplate.name\" [formControl]=\"ngControl.control\" [binary]=\"true\" [inputId]=\"formTemplate.name\" [value]=\"ngControl.control.value\" (onChange)=\"changeCheck($event)\"></p-checkbox>\n <label class=\"mb-0 ml-2\" [for]=\"formTemplate.name\">{{formTemplate.description}}</label>\n </div>\n\n <div *ngIf=\"ngControl.control.touched\">\n <onshore-form-validation-output\n [validationItems]=\"formTemplate.validationItems\"\n [validationErrors]=\"ngControl.control.errors\"\n [externValidationPattern]=\"formTemplate.validationPatternTranslation\">\n </onshore-form-validation-output>\n </div>\n\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3$3.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "trueValue", "falseValue"], outputs: ["onChange"] }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "fitContent", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: OnshoreFormValidationOutputComponent, selector: "onshore-form-validation-output", inputs: ["validationErrors", "externValidationPattern", "validationItems"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
784
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormCheckboxItemComponent, decorators: [{
785
+ type: Component,
786
+ args: [{ selector: 'onshore-form-checkbox-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-column mb-3\">\n <div class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate.label}}\n <span *ngIf=\"formTemplate.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <div class=\"p-field-checkbox flex\">\n <p-checkbox class=\"align-self-start mt-1\" [name]=\"formTemplate.name\" [formControl]=\"ngControl.control\" [binary]=\"true\" [inputId]=\"formTemplate.name\" [value]=\"ngControl.control.value\" (onChange)=\"changeCheck($event)\"></p-checkbox>\n <label class=\"mb-0 ml-2\" [for]=\"formTemplate.name\">{{formTemplate.description}}</label>\n </div>\n\n <div *ngIf=\"ngControl.control.touched\">\n <onshore-form-validation-output\n [validationItems]=\"formTemplate.validationItems\"\n [validationErrors]=\"ngControl.control.errors\"\n [externValidationPattern]=\"formTemplate.validationPatternTranslation\">\n </onshore-form-validation-output>\n </div>\n\n</div>\n" }]
787
+ }], ctorParameters: function () {
788
+ return [{ type: i1$1.NgControl, decorators: [{
789
+ type: Self
790
+ }, {
791
+ type: Optional
792
+ }] }, { type: i0.ChangeDetectorRef }];
793
+ }, propDecorators: { formTemplate: [{
794
+ type: Input
795
+ }] } });
796
+
797
+ class OnshoreFormAutocompleteItemComponent {
798
+ }
799
+ OnshoreFormAutocompleteItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormAutocompleteItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
800
+ OnshoreFormAutocompleteItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormAutocompleteItemComponent, selector: "onshore-form-autocomplete-item", ngImport: i0, template: "<!--<div class=\"flex flex-column mb-3\">\n <div *ngIf=\"formTemplate.label\" class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate.label}}\n <span *ngIf=\"formTemplate.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <p-autoComplete [placeholder]=\"formTemplate.placeholder\"\n appendTo=\"body\"\n [formControl]=\"this.ngControl.control\"\n (onSelect)=\"selected($event)\"\n (onUnselect)=\"selected($event)\"\n (onClear)=\"searchClear()\"\n [suggestions]=\"dataSearch\"\n (completeMethod)=\"searchPrepare($event)\"\n [size]=\"30\"\n [minLength]=\"2\"\n [multiple]=\"multiple\"\n [delay]=\"1000\"\n [unique]=\"true\"\n [field]=\"selectedField\"\n class=\"w-100\">\n <ng-template let-item pTemplate=\"item\">\n <div *ngIf=\"suggestionsHighlightedField\">\n <span class=\"mr-1\">\n <b>{{item[suggestionsHighlightedField]}}</b><br>\n </span>\n </div>\n <div [hidden]=\"suggestionsLineOneFields.length <= 0\"><span *ngFor=\"let field of suggestionsLineOneFields\">{{item[field]}} </span></div>\n <div [hidden]=\"suggestionsLineTwoFields.length <= 0\"><span *ngFor=\"let field of suggestionsLineTwoFields\">{{item[field]}} </span></div>\n </ng-template>\n </p-autoComplete>\n\n <small *ngIf=\"formTemplate.description\"><i class=\"fa fa-info-circle\"></i> {{formTemplate.description}}</small>\n\n <div *ngIf=\"ngControl.control.touched\">\n <onshore-form-validation-output\n [validationErrors]=\"ngControl.control.errors\"\n [externValidationPattern]=\"formTemplate.validationPatternTranslation\">\n </onshore-form-validation-output>\n </div>\n\n</div>\n-->\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
801
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormAutocompleteItemComponent, decorators: [{
802
+ type: Component,
803
+ args: [{ selector: 'onshore-form-autocomplete-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--<div class=\"flex flex-column mb-3\">\n <div *ngIf=\"formTemplate.label\" class=\"flex justify-content-between align-items-center\">\n <b [class.text-muted]=\"disabled\" class=\"mb-1 white-space-nowrap\">\n {{formTemplate.label}}\n <span *ngIf=\"formTemplate.required\" class=\"tl-color-danger\">*</span>\n </b>\n <i *ngIf=\"formTemplate.tooltip\" class=\"fa fa-info-circle tl-color-black\" [pTooltip]=\"formTemplate.tooltip\" tooltipPosition=\"left\" [escape]=\"false\"></i>\n </div>\n\n <p-autoComplete [placeholder]=\"formTemplate.placeholder\"\n appendTo=\"body\"\n [formControl]=\"this.ngControl.control\"\n (onSelect)=\"selected($event)\"\n (onUnselect)=\"selected($event)\"\n (onClear)=\"searchClear()\"\n [suggestions]=\"dataSearch\"\n (completeMethod)=\"searchPrepare($event)\"\n [size]=\"30\"\n [minLength]=\"2\"\n [multiple]=\"multiple\"\n [delay]=\"1000\"\n [unique]=\"true\"\n [field]=\"selectedField\"\n class=\"w-100\">\n <ng-template let-item pTemplate=\"item\">\n <div *ngIf=\"suggestionsHighlightedField\">\n <span class=\"mr-1\">\n <b>{{item[suggestionsHighlightedField]}}</b><br>\n </span>\n </div>\n <div [hidden]=\"suggestionsLineOneFields.length <= 0\"><span *ngFor=\"let field of suggestionsLineOneFields\">{{item[field]}} </span></div>\n <div [hidden]=\"suggestionsLineTwoFields.length <= 0\"><span *ngFor=\"let field of suggestionsLineTwoFields\">{{item[field]}} </span></div>\n </ng-template>\n </p-autoComplete>\n\n <small *ngIf=\"formTemplate.description\"><i class=\"fa fa-info-circle\"></i> {{formTemplate.description}}</small>\n\n <div *ngIf=\"ngControl.control.touched\">\n <onshore-form-validation-output\n [validationErrors]=\"ngControl.control.errors\"\n [externValidationPattern]=\"formTemplate.validationPatternTranslation\">\n </onshore-form-validation-output>\n </div>\n\n</div>\n-->\n" }]
804
+ }] });
805
+
806
+ class OnshoreFormsModule {
807
+ }
808
+ OnshoreFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
809
+ OnshoreFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsModule, declarations: [OnshoreFormsComponent,
810
+ OnshoreFormInputItemComponent,
811
+ OnshoreFormSwitchItemComponent,
812
+ OnshoreFormTextareaItemComponent,
813
+ OnshoreFormValidationOutputComponent,
814
+ OnshoreFormImageItemComponent,
815
+ OnshoreFormDropdownItemComponent,
816
+ OnshoreFormColorpickerItemComponent,
817
+ OnshoreFormCheckboxItemComponent,
818
+ OnshoreFormAutocompleteItemComponent], imports: [CommonModule,
819
+ FormsModule,
820
+ ReactiveFormsModule,
821
+ ButtonModule,
822
+ RippleModule,
823
+ AutoCompleteModule,
824
+ CheckboxModule,
825
+ ColorPickerModule,
826
+ DropdownModule,
827
+ MultiSelectModule,
828
+ TooltipModule,
829
+ InputNumberModule,
830
+ InputSwitchModule,
831
+ InputTextModule,
832
+ InputTextareaModule,
833
+ DialogModule], exports: [OnshoreFormsComponent,
834
+ OnshoreFormInputItemComponent,
835
+ OnshoreFormSwitchItemComponent,
836
+ OnshoreFormTextareaItemComponent,
837
+ OnshoreFormValidationOutputComponent,
838
+ OnshoreFormImageItemComponent,
839
+ OnshoreFormDropdownItemComponent,
840
+ OnshoreFormColorpickerItemComponent,
841
+ OnshoreFormCheckboxItemComponent,
842
+ OnshoreFormAutocompleteItemComponent] });
843
+ OnshoreFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsModule, providers: [
844
+ OnshoreFormsService
845
+ ], imports: [CommonModule,
846
+ FormsModule,
847
+ ReactiveFormsModule,
848
+ ButtonModule,
849
+ RippleModule,
850
+ AutoCompleteModule,
851
+ CheckboxModule,
852
+ ColorPickerModule,
853
+ DropdownModule,
854
+ MultiSelectModule,
855
+ TooltipModule,
856
+ InputNumberModule,
857
+ InputSwitchModule,
858
+ InputTextModule,
859
+ InputTextareaModule,
860
+ DialogModule] });
861
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsModule, decorators: [{
862
+ type: NgModule,
863
+ args: [{
864
+ declarations: [
865
+ OnshoreFormsComponent,
866
+ OnshoreFormInputItemComponent,
867
+ OnshoreFormSwitchItemComponent,
868
+ OnshoreFormTextareaItemComponent,
869
+ OnshoreFormValidationOutputComponent,
870
+ OnshoreFormImageItemComponent,
871
+ OnshoreFormDropdownItemComponent,
872
+ OnshoreFormColorpickerItemComponent,
873
+ OnshoreFormCheckboxItemComponent,
874
+ OnshoreFormAutocompleteItemComponent
875
+ ],
876
+ imports: [
877
+ CommonModule,
878
+ FormsModule,
879
+ ReactiveFormsModule,
880
+ ButtonModule,
881
+ RippleModule,
882
+ AutoCompleteModule,
883
+ CheckboxModule,
884
+ ColorPickerModule,
885
+ DropdownModule,
886
+ MultiSelectModule,
887
+ TooltipModule,
888
+ InputNumberModule,
889
+ InputSwitchModule,
890
+ InputTextModule,
891
+ InputTextareaModule,
892
+ DialogModule
893
+ ],
894
+ exports: [
895
+ OnshoreFormsComponent,
896
+ OnshoreFormInputItemComponent,
897
+ OnshoreFormSwitchItemComponent,
898
+ OnshoreFormTextareaItemComponent,
899
+ OnshoreFormValidationOutputComponent,
900
+ OnshoreFormImageItemComponent,
901
+ OnshoreFormDropdownItemComponent,
902
+ OnshoreFormColorpickerItemComponent,
903
+ OnshoreFormCheckboxItemComponent,
904
+ OnshoreFormAutocompleteItemComponent
905
+ ],
906
+ providers: [
907
+ OnshoreFormsService
908
+ ]
909
+ }]
910
+ }] });
911
+
912
+ /*
913
+ * Public API Surface of onshore-forms
914
+ */
915
+
916
+ /**
917
+ * Generated bundle index. Do not edit.
918
+ */
919
+
920
+ export { OnshoreFormAutocompleteItemComponent, OnshoreFormCheckboxItemComponent, OnshoreFormColorpickerItemComponent, OnshoreFormDropdownItemComponent, OnshoreFormImageItemComponent, OnshoreFormInputItemComponent, OnshoreFormSwitchItemComponent, OnshoreFormTemplateType, OnshoreFormTextareaItemComponent, OnshoreFormValidationOutputComponent, OnshoreFormsComponent, OnshoreFormsModule, OnshoreFormsService, OnshoreImageError };
921
+ //# sourceMappingURL=onshore-forms.mjs.map