onshore-forms 0.0.58 → 1.0.1

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 (49) hide show
  1. package/fesm2022/onshore-forms.mjs +1399 -0
  2. package/fesm2022/onshore-forms.mjs.map +1 -0
  3. package/lib/components/form-autocomplete-item/form-autocomplete-item.component.d.ts +5 -3
  4. package/lib/components/form-checkbox-item/form-checkbox-item.component.d.ts +3 -2
  5. package/lib/components/form-colorpicker-item/form-colorpicker-item.component.d.ts +3 -2
  6. package/lib/components/form-datetime-item/form-datetime-item.component.d.ts +3 -2
  7. package/lib/components/form-dropdown-item/form-dropdown-item.component.d.ts +3 -2
  8. package/lib/components/form-image-item/form-image-item.component.d.ts +3 -3
  9. package/lib/components/form-input-item/form-input-item.component.d.ts +3 -2
  10. package/lib/components/form-item-container/form-item-container.component.d.ts +3 -3
  11. package/lib/components/form-sort-item/form-sort-item.component.d.ts +2 -2
  12. package/lib/components/form-switch-item/form-switch-item.component.d.ts +3 -2
  13. package/lib/components/form-validation-output/form-validation-output.component.d.ts +1 -1
  14. package/lib/components/image-chooser/image-chooser.component.d.ts +2 -2
  15. package/lib/components/image-placeholder/image-placeholder.component.d.ts +1 -1
  16. package/lib/components/webcam/webcam.component.d.ts +2 -2
  17. package/lib/onshore-forms.component.d.ts +1 -1
  18. package/lib/onshore-forms.service.d.ts +1 -1
  19. package/package.json +12 -19
  20. package/public-api.d.ts +0 -1
  21. package/styles/scss/main.css +1 -1
  22. package/styles/scss/theme1.css +1 -1
  23. package/esm2020/lib/components/form-autocomplete-item/form-autocomplete-item.component.mjs +0 -98
  24. package/esm2020/lib/components/form-checkbox-item/form-checkbox-item.component.mjs +0 -54
  25. package/esm2020/lib/components/form-colorpicker-item/form-colorpicker-item.component.mjs +0 -63
  26. package/esm2020/lib/components/form-datetime-item/form-datetime-item.component.mjs +0 -59
  27. package/esm2020/lib/components/form-dropdown-item/form-dropdown-item.component.mjs +0 -101
  28. package/esm2020/lib/components/form-image-item/form-image-item.component.mjs +0 -164
  29. package/esm2020/lib/components/form-input-item/form-input-item.component.mjs +0 -78
  30. package/esm2020/lib/components/form-item-container/form-item-container.component.mjs +0 -130
  31. package/esm2020/lib/components/form-sort-item/form-sort-item.component.mjs +0 -89
  32. package/esm2020/lib/components/form-switch-item/form-switch-item.component.mjs +0 -58
  33. package/esm2020/lib/components/form-validation-output/form-validation-output.component.mjs +0 -38
  34. package/esm2020/lib/components/image-chooser/image-chooser.component.mjs +0 -79
  35. package/esm2020/lib/components/image-placeholder/image-placeholder.component.mjs +0 -41
  36. package/esm2020/lib/components/webcam/webcam.component.mjs +0 -49
  37. package/esm2020/lib/enums/form.enums.mjs +0 -37
  38. package/esm2020/lib/models/form.models.mjs +0 -2
  39. package/esm2020/lib/onshore-forms.component.mjs +0 -14
  40. package/esm2020/lib/onshore-forms.module.mjs +0 -189
  41. package/esm2020/lib/onshore-forms.service.mjs +0 -213
  42. package/esm2020/lib/validators/form.validators.mjs +0 -15
  43. package/esm2020/onshore-forms.mjs +0 -5
  44. package/esm2020/public-api.mjs +0 -24
  45. package/fesm2015/onshore-forms.mjs +0 -1550
  46. package/fesm2015/onshore-forms.mjs.map +0 -1
  47. package/fesm2020/onshore-forms.mjs +0 -1479
  48. package/fesm2020/onshore-forms.mjs.map +0 -1
  49. package/lib/onshore-forms.module.d.ts +0 -43
@@ -1,1479 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, Component, ChangeDetectionStrategy, Input, EventEmitter, Output, ViewChild, HostListener, Self, Optional, NgModule } from '@angular/core';
3
- import * as i1$1 from '@angular/forms';
4
- import { FormGroup, FormArray, FormControl, 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$1 from 'primeng/inputnumber';
9
- import { InputNumberModule } from 'primeng/inputnumber';
10
- import * as i4$1 from 'primeng/inputtext';
11
- import { InputTextModule } from 'primeng/inputtext';
12
- import * as i5 from 'primeng/inputtextarea';
13
- import { InputTextareaModule } from 'primeng/inputtextarea';
14
- import * as i2$1 from 'primeng/button';
15
- import { ButtonModule } from 'primeng/button';
16
- import * as i3 from 'primeng/tooltip';
17
- import { TooltipModule } from 'primeng/tooltip';
18
- import * as i4 from 'primeng/togglebutton';
19
- import { ToggleButtonModule } from 'primeng/togglebutton';
20
- import * as i1 from '@ngx-translate/core';
21
- import { TranslateModule } from '@ngx-translate/core';
22
- import * as i2$2 from 'primeng/inputswitch';
23
- import { InputSwitchModule } from 'primeng/inputswitch';
24
- import * as i2$3 from 'primeng/dynamicdialog';
25
- import { DialogService } from 'primeng/dynamicdialog';
26
- import * as i5$2 from 'primeng/dialog';
27
- import { DialogModule } from 'primeng/dialog';
28
- import * as i3$2 from 'primeng/api';
29
- import * as i4$2 from 'ngx-image-cropper';
30
- import { ImageCropperModule } from 'ngx-image-cropper';
31
- import * as i5$1 from 'ngx-webcam';
32
- import { WebcamModule } from 'ngx-webcam';
33
- import * as i3$3 from 'primeng/dropdown';
34
- import { DropdownModule } from 'primeng/dropdown';
35
- import * as i4$3 from 'primeng/multiselect';
36
- import { MultiSelectModule } from 'primeng/multiselect';
37
- import * as i2$4 from 'primeng/colorpicker';
38
- import { ColorPickerModule } from 'primeng/colorpicker';
39
- import * as i2$5 from 'primeng/checkbox';
40
- import { CheckboxModule } from 'primeng/checkbox';
41
- import * as i3$4 from 'primeng/autocomplete';
42
- import { AutoCompleteModule } from 'primeng/autocomplete';
43
- import * as i2$6 from 'primeng/calendar';
44
- import { CalendarModule } from 'primeng/calendar';
45
- import { RippleModule } from 'primeng/ripple';
46
- import { SelectButtonModule } from 'primeng/selectbutton';
47
- import * as i3$5 from 'ng2-dragula';
48
- import { DragulaModule } from 'ng2-dragula';
49
-
50
- var OnshoreFormTemplateType;
51
- (function (OnshoreFormTemplateType) {
52
- OnshoreFormTemplateType["text"] = "text";
53
- OnshoreFormTemplateType["textarea"] = "textarea";
54
- OnshoreFormTemplateType["editor"] = "editor";
55
- OnshoreFormTemplateType["password"] = "password";
56
- OnshoreFormTemplateType["number"] = "number";
57
- OnshoreFormTemplateType["email"] = "email";
58
- OnshoreFormTemplateType["phone"] = "phone";
59
- OnshoreFormTemplateType["regexp"] = "regexp";
60
- OnshoreFormTemplateType["select"] = "select";
61
- OnshoreFormTemplateType["switch"] = "switch";
62
- OnshoreFormTemplateType["check"] = "check";
63
- OnshoreFormTemplateType["radio"] = "radio";
64
- OnshoreFormTemplateType["image"] = "image";
65
- OnshoreFormTemplateType["autocomplete"] = "autocomplete";
66
- OnshoreFormTemplateType["color"] = "color";
67
- OnshoreFormTemplateType["date"] = "date";
68
- OnshoreFormTemplateType["time"] = "time";
69
- OnshoreFormTemplateType["datetime"] = "datetime";
70
- OnshoreFormTemplateType["sort"] = "sort";
71
- OnshoreFormTemplateType["subform"] = "subform";
72
- })(OnshoreFormTemplateType || (OnshoreFormTemplateType = {}));
73
- var OnshoreFormTemplateLayout;
74
- (function (OnshoreFormTemplateLayout) {
75
- OnshoreFormTemplateLayout["vertical"] = "vertical";
76
- OnshoreFormTemplateLayout["horizontal"] = "horizontal";
77
- OnshoreFormTemplateLayout["auto"] = "auto";
78
- })(OnshoreFormTemplateLayout || (OnshoreFormTemplateLayout = {}));
79
- var OnshoreImageError;
80
- (function (OnshoreImageError) {
81
- OnshoreImageError["none"] = "";
82
- OnshoreImageError["fileType"] = "fileType";
83
- OnshoreImageError["ratio"] = "ratio";
84
- OnshoreImageError["size"] = "size";
85
- })(OnshoreImageError || (OnshoreImageError = {}));
86
-
87
- class OnshoreFormsService {
88
- constructor() {
89
- this._formValidations = [];
90
- this.subscriptions = [];
91
- this.isLoading$ = new Subject();
92
- this._form = new FormGroup({}, { updateOn: 'change' });
93
- this._formTemplate = [];
94
- }
95
- get form() {
96
- return this._form;
97
- }
98
- get formValues() {
99
- return this._form?.value;
100
- }
101
- patchForm(value) {
102
- this._form?.patchValue(value);
103
- }
104
- resetForm() {
105
- this._form?.reset();
106
- this._form?.updateValueAndValidity({ onlySelf: false, emitEvent: true });
107
- this.subscriptions.forEach((subscription) => {
108
- subscription.unsubscribe();
109
- });
110
- this._form = null;
111
- this._formTemplate = null;
112
- }
113
- resetFormControl(name, touched = false) {
114
- this._form?.get(name).reset();
115
- if (touched) {
116
- this._form?.get(name).markAsTouched();
117
- this._form?.get(name).markAsDirty();
118
- }
119
- this._form?.get(name).updateValueAndValidity({ onlySelf: false, emitEvent: true });
120
- }
121
- generateForm(formTemplate) {
122
- this._formTemplate = formTemplate;
123
- this._form = new FormGroup({}, { updateOn: 'change' });
124
- this._form = this.iterateNestedForm(this._form, formTemplate);
125
- return this._form;
126
- }
127
- formTemplate(name, formTemplate = this._formTemplate) {
128
- let template;
129
- if (formTemplate) {
130
- for (let i = 0; i < formTemplate?.length; i++) {
131
- const item = formTemplate[i];
132
- if (item.name === name) {
133
- template = item;
134
- i = formTemplate.length;
135
- }
136
- else if (item.subformArray) {
137
- const arrayTemplate = this.formTemplate(name, item.subformArray);
138
- if (arrayTemplate)
139
- template = arrayTemplate;
140
- }
141
- else if (item.subformObject) {
142
- const objectTemplate = this.formTemplate(name, item.subformObject);
143
- if (objectTemplate)
144
- template = objectTemplate;
145
- }
146
- }
147
- }
148
- return template;
149
- }
150
- formControl(name, formGroup = this._form) {
151
- return formGroup?.get(name);
152
- }
153
- formArray(name) {
154
- return this._form?.get(name);
155
- }
156
- formGroup(form, name) {
157
- return form.get(name);
158
- }
159
- addFormArrayItem(formArray, item, defaultValues = null) {
160
- let formControls = {};
161
- if (item) {
162
- item.subformArray?.forEach((subitem) => {
163
- if (subitem.type == OnshoreFormTemplateType.subform) {
164
- if (item.subformArray) {
165
- formControls[subitem.name] = new FormArray([]);
166
- formControls[subitem.name].setParent(formControls[subitem.name]);
167
- this.subscribeNestedFormArray(formControls[subitem.name]);
168
- }
169
- if (item.subformObject) {
170
- formControls[subitem.name] = new FormGroup({});
171
- this.subscribeNestedFormGroup(formControls[subitem.name]);
172
- }
173
- }
174
- else {
175
- const defaultValue = defaultValues?.find(value => value.name === subitem.name)?.value;
176
- if (defaultValue)
177
- subitem.default = defaultValue.value;
178
- formControls[subitem.name] = new FormControl(defaultValue ?? (subitem.default !== undefined ? subitem.default : ''), {
179
- validators: subitem.validators || [],
180
- updateOn: 'change'
181
- });
182
- formControls[subitem.name].updateValueAndValidity({ onlySelf: false, emitEvent: true });
183
- }
184
- });
185
- }
186
- const formGroup = new FormGroup(formControls);
187
- formGroup.setParent(formArray);
188
- formArray.push(formGroup);
189
- this.subscribeNestedFormGroup(formGroup);
190
- return formGroup;
191
- }
192
- removeFormArrayItem(form, index) {
193
- form.removeAt(index);
194
- }
195
- setFormValidations(validations = []) {
196
- this._formValidations = validations;
197
- }
198
- enable() {
199
- this._formTemplate.forEach((item) => {
200
- item.enabled = true;
201
- });
202
- setTimeout(() => {
203
- this._form?.enable({ onlySelf: true, emitEvent: false });
204
- }, 100);
205
- }
206
- disable() {
207
- this._formTemplate.forEach((item) => {
208
- item.enabled = false;
209
- });
210
- setTimeout(() => {
211
- this._form?.disable({ onlySelf: true, emitEvent: false });
212
- }, 100);
213
- }
214
- setError(control, error) {
215
- const errors = { ...this.formControl(control).errors ?? {}, ...error };
216
- this.formControl(control).setErrors(errors);
217
- }
218
- setLoader(loaders$) {
219
- loaders$.forEach($loader => {
220
- this.subscriptions.push($loader.subscribe(isLoading => {
221
- isLoading ? this.disable() : this.enable();
222
- this.isLoading$.next(isLoading);
223
- }));
224
- });
225
- }
226
- lock(lockSubfields = true) {
227
- this._formTemplate.forEach((item) => {
228
- item.locked = true;
229
- if (item.subformArray && lockSubfields) {
230
- item.subformArray.forEach(subitem => {
231
- subitem.locked = true;
232
- });
233
- }
234
- });
235
- }
236
- unlock() {
237
- this._formTemplate.forEach((item) => {
238
- item.locked = false;
239
- if (item.subformArray) {
240
- item.subformArray.forEach(subitem => {
241
- subitem.locked = false;
242
- });
243
- }
244
- });
245
- }
246
- iterateNestedForm(form, formTemplate) {
247
- formTemplate.forEach((item) => {
248
- if (item.type === OnshoreFormTemplateType.subform) {
249
- if (item.subformArray) {
250
- form.controls[item.name] = new FormArray([]);
251
- form.controls[item.name].setParent(form);
252
- this.subscribeNestedFormArray(form.controls[item.name]);
253
- }
254
- if (item.subformObject) {
255
- form.controls[item.name] = new FormGroup({});
256
- form.controls[item.name] = this.iterateNestedForm(form.controls[item.name], item.subformObject);
257
- this.subscribeNestedFormGroup(form.controls[item.name]);
258
- }
259
- }
260
- else {
261
- form.addControl(item.name, new FormControl(item.default !== undefined ? item.default : '', {
262
- validators: item.validators || [],
263
- updateOn: 'change'
264
- }));
265
- }
266
- });
267
- return form;
268
- }
269
- subscribeNestedFormArray(nestedFormItem) {
270
- this.subscriptions.push(nestedFormItem.valueChanges.subscribe(() => {
271
- this.form?.updateValueAndValidity({ onlySelf: true, emitEvent: false });
272
- }));
273
- this.subscriptions.push(nestedFormItem.statusChanges.subscribe(() => {
274
- this.form?.updateValueAndValidity({ onlySelf: true, emitEvent: false });
275
- }));
276
- }
277
- subscribeNestedFormGroup(nestedFormItem) {
278
- this.subscriptions.push(nestedFormItem.valueChanges.subscribe(() => {
279
- this.form?.updateValueAndValidity({ onlySelf: true, emitEvent: false });
280
- }));
281
- this.subscriptions.push(nestedFormItem.statusChanges.subscribe(() => {
282
- this.form?.updateValueAndValidity({ onlySelf: true, emitEvent: false });
283
- }));
284
- }
285
- }
286
- OnshoreFormsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
287
- OnshoreFormsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsService, providedIn: 'root' });
288
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsService, decorators: [{
289
- type: Injectable,
290
- args: [{
291
- providedIn: 'root'
292
- }]
293
- }], ctorParameters: function () { return []; } });
294
-
295
- class OnshoreFormsComponent {
296
- constructor() { }
297
- ngOnInit() {
298
- }
299
- }
300
- OnshoreFormsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
301
- OnshoreFormsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormsComponent, selector: "lib-onshore-forms", ngImport: i0, template: '', isInline: true });
302
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsComponent, decorators: [{
303
- type: Component,
304
- args: [{ selector: 'lib-onshore-forms', template: '' }]
305
- }], ctorParameters: function () { return []; } });
306
-
307
- class OnshoreFormValidationOutputComponent {
308
- constructor(cdr, translate) {
309
- this.cdr = cdr;
310
- this.translate = translate;
311
- this.validationTranslation = '';
312
- }
313
- ngOnChanges(changes) {
314
- this.validationTranslation = '';
315
- if (changes['validationErrors'].currentValue && this.validationErrors) {
316
- Object.keys(this.validationErrors).forEach(error => {
317
- const exists = Object.values(this.validationItems ?? []).filter(validationItem => validationItem == error);
318
- if (exists && exists.length > 0) {
319
- this.validationTranslation += this.translate.instant('form.validation.' + error) + '<br>';
320
- }
321
- else {
322
- const errorValues = this.validationErrors[error];
323
- this.validationTranslation += this.translate.instant('form.validation.' + error, errorValues) + '<br>';
324
- }
325
- });
326
- }
327
- this.cdr.markForCheck();
328
- }
329
- }
330
- 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 });
331
- OnshoreFormValidationOutputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormValidationOutputComponent, selector: "onshore-form-validation-output", inputs: { validationErrors: "validationErrors", validationItems: "validationItems" }, usesOnChanges: true, ngImport: i0, template: "<small class=\"onshore-color-danger\"\n *ngIf=\"validationTranslation\"\n [innerHTML]=\"validationTranslation\">\n</small>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
332
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormValidationOutputComponent, decorators: [{
333
- type: Component,
334
- args: [{ selector: 'onshore-form-validation-output', changeDetection: ChangeDetectionStrategy.OnPush, template: "<small class=\"onshore-color-danger\"\n *ngIf=\"validationTranslation\"\n [innerHTML]=\"validationTranslation\">\n</small>\n" }]
335
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TranslateService }]; }, propDecorators: { validationErrors: [{
336
- type: Input
337
- }], validationItems: [{
338
- type: Input
339
- }] } });
340
-
341
- class OnshoreFormItemContainer {
342
- constructor(cdr) {
343
- this.cdr = cdr;
344
- this.actionButtonDisabled = false;
345
- this.actionButtonClick = new EventEmitter();
346
- this.lockIsChanged = new EventEmitter();
347
- this.disabled = false;
348
- this.OnshoreFormTemplateLayout = OnshoreFormTemplateLayout;
349
- this.layout = OnshoreFormTemplateLayout.auto;
350
- }
351
- enabled(enable) {
352
- setTimeout(() => {
353
- if (enable) {
354
- this.ngControl?.control.enable();
355
- }
356
- else {
357
- this.ngControl?.control.disable();
358
- }
359
- this.disabled = !enable;
360
- this.cdr.markForCheck();
361
- }, 100);
362
- }
363
- lockChanged(unlocked) {
364
- if (unlocked && this.formTemplate.enabled) {
365
- this.tempLockValue = this.ngControl?.control.value;
366
- this.enabled(true);
367
- this.disabled = false;
368
- this.lockIsChanged.emit(unlocked);
369
- }
370
- else {
371
- this.enabled(false);
372
- this.disabled = true;
373
- this.ngControl?.control.setValue(this.tempLockValue);
374
- this.tempLockValue = null;
375
- this.lockIsChanged.emit(unlocked);
376
- }
377
- this.cdr.markForCheck();
378
- }
379
- onWindowResize() {
380
- const conatinerWidth = this.formContainer?.nativeElement.offsetWidth;
381
- if (conatinerWidth > 500 && this.formTemplate.layout === OnshoreFormTemplateLayout.auto && this.layout !== OnshoreFormTemplateLayout.horizontal) {
382
- this.layout = OnshoreFormTemplateLayout.horizontal;
383
- this.cdr.markForCheck();
384
- }
385
- if (conatinerWidth <= 500 && this.formTemplate.layout === OnshoreFormTemplateLayout.auto && this.layout !== OnshoreFormTemplateLayout.vertical) {
386
- this.layout = OnshoreFormTemplateLayout.vertical;
387
- this.cdr.markForCheck();
388
- }
389
- }
390
- ngOnInit() {
391
- this.ngControl?.control?.valueChanges.subscribe(value => {
392
- this.cdr.markForCheck();
393
- });
394
- this.ngControl?.control?.statusChanges.subscribe(status => {
395
- this.cdr.markForCheck();
396
- });
397
- this.enabled(this.formTemplate.enabled);
398
- this.disabled = !this.formTemplate.enabled;
399
- if (this.formTemplate.locked) {
400
- this.enabled(false);
401
- this.disabled = true;
402
- }
403
- this.layout = this.formTemplate.layout;
404
- setTimeout(() => {
405
- this.cdr.markForCheck();
406
- }, 100);
407
- }
408
- ngAfterViewInit() {
409
- this.onWindowResize();
410
- }
411
- ngOnChanges(changes) {
412
- const previousValue = changes['formTemplate']?.previousValue;
413
- const currentValue = changes['formTemplate']?.currentValue;
414
- if (currentValue) {
415
- if (previousValue?.enabled !== currentValue?.enabled) {
416
- this.enabled(currentValue?.enabled);
417
- this.disabled = !currentValue?.enabled;
418
- }
419
- if (previousValue?.locked !== currentValue?.locked) {
420
- if (currentValue.locked) {
421
- this.enabled(false);
422
- this.disabled = true;
423
- }
424
- else {
425
- this.enabled(currentValue.enabled);
426
- this.disabled = currentValue.enabled;
427
- }
428
- }
429
- if (previousValue?.layout !== currentValue?.layout) {
430
- this.layout = this.formTemplate.layout;
431
- this.onWindowResize();
432
- }
433
- if (previousValue?.labelStyle !== currentValue?.labelStyle) {
434
- this.onWindowResize();
435
- }
436
- this.cdr.markForCheck();
437
- }
438
- }
439
- }
440
- OnshoreFormItemContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormItemContainer, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
441
- OnshoreFormItemContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: { formTemplate: "formTemplate", ngControl: "ngControl", actionButtonDisabled: "actionButtonDisabled" }, outputs: { actionButtonClick: "actionButtonClick", lockIsChanged: "lockIsChanged" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, viewQueries: [{ propertyName: "formContainer", first: true, predicate: ["formContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [class.mb-4]=\"!formTemplate.noGap\" #formContainer>\n <div class=\"flex w-full\"\n [class.flex-column]=\"layout == OnshoreFormTemplateLayout.vertical\"\n [class.flex-row]=\"layout == OnshoreFormTemplateLayout.horizontal\"\n [class.justify-content-between]=\"layout == OnshoreFormTemplateLayout.horizontal\">\n\n <div #formLabel\n [hidden]=\"!formTemplate.label || formTemplate.label == ''\"\n class=\"flex justify-content-between\"\n [style]=\"formTemplate.labelStyle ?? 'min-width: 200px; max-height: 36px'\">\n\n <span *ngIf=\"formTemplate.label && formTemplate.label != ''\" [class.mr-2]=\"layout == OnshoreFormTemplateLayout.horizontal\"\n [class.align-self-center]=\"layout == OnshoreFormTemplateLayout.horizontal\"\n [class.mb-2]=\"layout == OnshoreFormTemplateLayout.vertical\">\n {{formTemplate.label}}\n <small *ngIf=\"formTemplate.required\" class=\"onshore-color-danger\">*</small>\n </span>\n\n <div *ngIf=\"formTemplate.tooltip && layout == OnshoreFormTemplateLayout.vertical\" [pTooltip]=\"formTemplate.tooltip\" [escape]=\"false\" [tooltipPosition]=\"'left'\" appendTo=\"body\"><i class=\"fa fa-circle-question onshore-color-gray-5\"></i></div>\n\n </div>\n\n <div class=\"flex w-full\">\n <p-toggleButton\n *ngIf=\"formTemplate.locked\"\n (onChange)=\"lockChanged($event.checked)\"\n onIcon=\"fa fa-lock-open\"\n offIcon=\"fa fa-lock\"\n class=\"mr-2\"\n [style]=\"{'height': '37px'}\"\n [disabled]=\"!formTemplate.enabled\">\n </p-toggleButton>\n\n <div class=\"w-full overflow-hidden align-self-center\">\n <ng-content></ng-content>\n </div>\n\n <button *ngIf=\"formTemplate.actionButton\"\n class=\"ml-2 onshore-button-light\"\n [style]=\"{'height': '37px', 'min-width': '38px'}\"\n pButton\n [disabled]=\"actionButtonDisabled\"\n [icon]=\"formTemplate.actionButtonIcon\"\n (click)=\"actionButtonClick.emit()\">\n </button>\n </div>\n\n <div *ngIf=\"formTemplate.tooltip && layout == OnshoreFormTemplateLayout.horizontal\" class=\"ml-2 align-self-center\" [pTooltip]=\"formTemplate.tooltip\" [tooltipPosition]=\"'left'\" [escape]=\"false\"><i class=\"fa fa-circle-question onshore-color-gray-5\"></i></div>\n </div>\n\n <div *ngIf=\"ngControl.control.touched || ngControl.control.dirty\" [style]=\"{'margin-left': layout == OnshoreFormTemplateLayout.horizontal ? (formLabel?.clientWidth + (formTemplate.locked ? 48 : 0)) + 'px' : (formTemplate.locked ? 48 : 0) + 'px', 'margin-right': formTemplate.tooltip && layout == OnshoreFormTemplateLayout.horizontal ? '16px' : '0px'}\">\n <onshore-form-validation-output\n [validationItems]=\"formTemplate.validationItems\"\n [validationErrors]=\"ngControl.control.errors\">\n </onshore-form-validation-output>\n </div>\n\n <div *ngIf=\"formTemplate.description\" class=\"mt-2\" [style]=\"{'margin-left': layout == OnshoreFormTemplateLayout.horizontal ? (formLabel?.clientWidth + (formTemplate.locked ? 48 : 0)) + 'px' : (formTemplate.locked ? 48 : 0) + 'px', 'margin-right': formTemplate.tooltip && layout == OnshoreFormTemplateLayout.horizontal ? '16px' : '0px'}\">\n <small class=\"onshore-color-gray-5\"><i class=\"fa fa-info-circle\"></i> {{formTemplate.description}}</small>\n </div>\n\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { 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.ToggleButton, selector: "p-toggleButton", inputs: ["onLabel", "offLabel", "onIcon", "offIcon", "ariaLabelledBy", "disabled", "style", "styleClass", "inputId", "tabindex", "iconPos"], outputs: ["onChange"] }, { kind: "component", type: OnshoreFormValidationOutputComponent, selector: "onshore-form-validation-output", inputs: ["validationErrors", "validationItems"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
442
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormItemContainer, decorators: [{
443
- type: Component,
444
- args: [{ selector: 'onshore-form-item-container', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class.mb-4]=\"!formTemplate.noGap\" #formContainer>\n <div class=\"flex w-full\"\n [class.flex-column]=\"layout == OnshoreFormTemplateLayout.vertical\"\n [class.flex-row]=\"layout == OnshoreFormTemplateLayout.horizontal\"\n [class.justify-content-between]=\"layout == OnshoreFormTemplateLayout.horizontal\">\n\n <div #formLabel\n [hidden]=\"!formTemplate.label || formTemplate.label == ''\"\n class=\"flex justify-content-between\"\n [style]=\"formTemplate.labelStyle ?? 'min-width: 200px; max-height: 36px'\">\n\n <span *ngIf=\"formTemplate.label && formTemplate.label != ''\" [class.mr-2]=\"layout == OnshoreFormTemplateLayout.horizontal\"\n [class.align-self-center]=\"layout == OnshoreFormTemplateLayout.horizontal\"\n [class.mb-2]=\"layout == OnshoreFormTemplateLayout.vertical\">\n {{formTemplate.label}}\n <small *ngIf=\"formTemplate.required\" class=\"onshore-color-danger\">*</small>\n </span>\n\n <div *ngIf=\"formTemplate.tooltip && layout == OnshoreFormTemplateLayout.vertical\" [pTooltip]=\"formTemplate.tooltip\" [escape]=\"false\" [tooltipPosition]=\"'left'\" appendTo=\"body\"><i class=\"fa fa-circle-question onshore-color-gray-5\"></i></div>\n\n </div>\n\n <div class=\"flex w-full\">\n <p-toggleButton\n *ngIf=\"formTemplate.locked\"\n (onChange)=\"lockChanged($event.checked)\"\n onIcon=\"fa fa-lock-open\"\n offIcon=\"fa fa-lock\"\n class=\"mr-2\"\n [style]=\"{'height': '37px'}\"\n [disabled]=\"!formTemplate.enabled\">\n </p-toggleButton>\n\n <div class=\"w-full overflow-hidden align-self-center\">\n <ng-content></ng-content>\n </div>\n\n <button *ngIf=\"formTemplate.actionButton\"\n class=\"ml-2 onshore-button-light\"\n [style]=\"{'height': '37px', 'min-width': '38px'}\"\n pButton\n [disabled]=\"actionButtonDisabled\"\n [icon]=\"formTemplate.actionButtonIcon\"\n (click)=\"actionButtonClick.emit()\">\n </button>\n </div>\n\n <div *ngIf=\"formTemplate.tooltip && layout == OnshoreFormTemplateLayout.horizontal\" class=\"ml-2 align-self-center\" [pTooltip]=\"formTemplate.tooltip\" [tooltipPosition]=\"'left'\" [escape]=\"false\"><i class=\"fa fa-circle-question onshore-color-gray-5\"></i></div>\n </div>\n\n <div *ngIf=\"ngControl.control.touched || ngControl.control.dirty\" [style]=\"{'margin-left': layout == OnshoreFormTemplateLayout.horizontal ? (formLabel?.clientWidth + (formTemplate.locked ? 48 : 0)) + 'px' : (formTemplate.locked ? 48 : 0) + 'px', 'margin-right': formTemplate.tooltip && layout == OnshoreFormTemplateLayout.horizontal ? '16px' : '0px'}\">\n <onshore-form-validation-output\n [validationItems]=\"formTemplate.validationItems\"\n [validationErrors]=\"ngControl.control.errors\">\n </onshore-form-validation-output>\n </div>\n\n <div *ngIf=\"formTemplate.description\" class=\"mt-2\" [style]=\"{'margin-left': layout == OnshoreFormTemplateLayout.horizontal ? (formLabel?.clientWidth + (formTemplate.locked ? 48 : 0)) + 'px' : (formTemplate.locked ? 48 : 0) + 'px', 'margin-right': formTemplate.tooltip && layout == OnshoreFormTemplateLayout.horizontal ? '16px' : '0px'}\">\n <small class=\"onshore-color-gray-5\"><i class=\"fa fa-info-circle\"></i> {{formTemplate.description}}</small>\n </div>\n\n</div>\n" }]
445
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { formTemplate: [{
446
- type: Input
447
- }], ngControl: [{
448
- type: Input
449
- }], actionButtonDisabled: [{
450
- type: Input
451
- }], actionButtonClick: [{
452
- type: Output
453
- }], lockIsChanged: [{
454
- type: Output
455
- }], formContainer: [{
456
- type: ViewChild,
457
- args: ['formContainer']
458
- }], onWindowResize: [{
459
- type: HostListener,
460
- args: ['window:resize', ['$event']]
461
- }] } });
462
-
463
- class OnshoreFormInputItemComponent {
464
- constructor(ngControl, cdr) {
465
- this.ngControl = ngControl;
466
- this.cdr = cdr;
467
- this.step = 1;
468
- this.min = 0;
469
- this.max = 999999;
470
- this.minLength = 0;
471
- this.maxLength = 999999;
472
- this.actionButtonDisabled = false;
473
- this.actionButtonClick = new EventEmitter();
474
- this.OnshoreFormTemplateType = OnshoreFormTemplateType;
475
- this.passwordVisible = false;
476
- this.disabled = false;
477
- this.ngControl.valueAccessor = this;
478
- }
479
- // ControlValueAccessor interface
480
- writeValue(obj) { }
481
- registerOnChange(fn) { }
482
- registerOnTouched(fn) { }
483
- setDisabledState(isDisabled) {
484
- this.disabled = isDisabled;
485
- }
486
- ngOnInit() {
487
- if (this.ngControl.control?.value == '' && this.formTemplate.default != undefined) {
488
- this.ngControl.control?.setValue(this.formTemplate.default);
489
- this.cdr.markForCheck();
490
- }
491
- }
492
- // @ts-ignore
493
- onNumberInput(event) {
494
- this.ngControl.control?.setValue(event.value);
495
- this.ngControl?.control?.markAsDirty();
496
- this.cdr.markForCheck();
497
- }
498
- ngOnChanges(changes) {
499
- this.cdr.markForCheck();
500
- }
501
- ngOnDestroy() {
502
- this.ngControl.control?.disable();
503
- }
504
- }
505
- 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 });
506
- OnshoreFormInputItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormInputItemComponent, selector: "onshore-form-input-item", inputs: { formTemplate: "formTemplate", step: "step", min: "min", max: "max", minLength: "minLength", maxLength: "maxLength", actionButtonDisabled: "actionButtonDisabled" }, outputs: { actionButtonClick: "actionButtonClick" }, usesOnChanges: true, ngImport: i0, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n <span class=\"p-inputgroup w-full\">\n\n <textarea *ngIf=\"formTemplate.type == OnshoreFormTemplateType.textarea\"\n class=\"w-full\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\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\"\n [minLength]=\"minLength\"\n [maxLength]=\"maxLength\"></textarea>\n\n <input *ngIf=\"formTemplate.type == OnshoreFormTemplateType.text || formTemplate.type == OnshoreFormTemplateType.email || formTemplate.type == OnshoreFormTemplateType.phone\"\n class=\"w-full\"\n [type]=\"formTemplate.type\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n pInputText\n [formControl]=\"ngControl.control\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [minLength]=\"minLength\"\n [maxLength]=\"maxLength\"/>\n\n <input *ngIf=\"formTemplate.type == OnshoreFormTemplateType.password\"\n class=\"w-full\"\n [type]=\"passwordVisible ? 'text' : formTemplate.type\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n pInputText\n [formControl]=\"ngControl.control\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [minLength]=\"minLength\"\n [maxLength]=\"maxLength\"/>\n\n <p-inputNumber *ngIf=\"formTemplate.type == OnshoreFormTemplateType.number\"\n class=\"w-full\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? 0\"\n [disabled]=\"disabled\"\n [formControl]=\"ngControl.control\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [showButtons]=\"true\"\n [step]=\"step ?? 1\"\n [min]=\"min\"\n [max]=\"max\"\n (onInput)=\"onNumberInput($event)\">\n </p-inputNumber>\n\n <span *ngIf=\"formTemplate.inputAddon\" class=\"p-inputgroup-addon\">\n <i [class]=\"formTemplate.inputAddon\"></i>\n </span>\n\n <span *ngIf=\"formTemplate.type == OnshoreFormTemplateType.password\"\n (click)=\"passwordVisible = !passwordVisible\"\n class=\"p-inputgroup-addon cursor-pointer\">\n <i class=\"fa\"\n [class.fa-eye-slash]=\"passwordVisible\"\n [class.fa-eye]=\"!passwordVisible\"\n ></i>\n </span>\n\n </span>\n</onshore-form-item-container>\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: "component", type: i3$1.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: i4$1.InputText, selector: "[pInputText]" }, { kind: "directive", type: i5.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
507
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormInputItemComponent, decorators: [{
508
- type: Component,
509
- args: [{ selector: 'onshore-form-input-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n <span class=\"p-inputgroup w-full\">\n\n <textarea *ngIf=\"formTemplate.type == OnshoreFormTemplateType.textarea\"\n class=\"w-full\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\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\"\n [minLength]=\"minLength\"\n [maxLength]=\"maxLength\"></textarea>\n\n <input *ngIf=\"formTemplate.type == OnshoreFormTemplateType.text || formTemplate.type == OnshoreFormTemplateType.email || formTemplate.type == OnshoreFormTemplateType.phone\"\n class=\"w-full\"\n [type]=\"formTemplate.type\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n pInputText\n [formControl]=\"ngControl.control\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [minLength]=\"minLength\"\n [maxLength]=\"maxLength\"/>\n\n <input *ngIf=\"formTemplate.type == OnshoreFormTemplateType.password\"\n class=\"w-full\"\n [type]=\"passwordVisible ? 'text' : formTemplate.type\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n pInputText\n [formControl]=\"ngControl.control\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [minLength]=\"minLength\"\n [maxLength]=\"maxLength\"/>\n\n <p-inputNumber *ngIf=\"formTemplate.type == OnshoreFormTemplateType.number\"\n class=\"w-full\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? 0\"\n [disabled]=\"disabled\"\n [formControl]=\"ngControl.control\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [showButtons]=\"true\"\n [step]=\"step ?? 1\"\n [min]=\"min\"\n [max]=\"max\"\n (onInput)=\"onNumberInput($event)\">\n </p-inputNumber>\n\n <span *ngIf=\"formTemplate.inputAddon\" class=\"p-inputgroup-addon\">\n <i [class]=\"formTemplate.inputAddon\"></i>\n </span>\n\n <span *ngIf=\"formTemplate.type == OnshoreFormTemplateType.password\"\n (click)=\"passwordVisible = !passwordVisible\"\n class=\"p-inputgroup-addon cursor-pointer\">\n <i class=\"fa\"\n [class.fa-eye-slash]=\"passwordVisible\"\n [class.fa-eye]=\"!passwordVisible\"\n ></i>\n </span>\n\n </span>\n</onshore-form-item-container>\n" }]
510
- }], ctorParameters: function () { return [{ type: i1$1.NgControl, decorators: [{
511
- type: Self
512
- }, {
513
- type: Optional
514
- }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formTemplate: [{
515
- type: Input
516
- }], step: [{
517
- type: Input
518
- }], min: [{
519
- type: Input
520
- }], max: [{
521
- type: Input
522
- }], minLength: [{
523
- type: Input
524
- }], maxLength: [{
525
- type: Input
526
- }], actionButtonDisabled: [{
527
- type: Input
528
- }], actionButtonClick: [{
529
- type: Output
530
- }] } });
531
-
532
- class OnshoreFormSwitchItemComponent {
533
- constructor(ngControl, cdr) {
534
- this.ngControl = ngControl;
535
- this.cdr = cdr;
536
- this.actionButtonDisabled = false;
537
- this.valueChange = new EventEmitter();
538
- this.actionButtonClick = new EventEmitter();
539
- this.disabled = false;
540
- this.ngControl.valueAccessor = this;
541
- }
542
- // ControlValueAccessor interface
543
- writeValue(obj) { }
544
- registerOnChange(fn) { }
545
- registerOnTouched(fn) { }
546
- setDisabledState(isDisabled) {
547
- this.disabled = isDisabled;
548
- }
549
- ngOnInit() {
550
- this.ngControl.control?.valueChanges.pipe(debounceTime(100), distinctUntilChanged(), skip(1)).subscribe(newValue => {
551
- this.valueChange.emit(this.ngControl.control?.value);
552
- });
553
- if (this.ngControl.control?.value == undefined && this.formTemplate.default != undefined) {
554
- this.ngControl.control?.setValue(this.formTemplate.default);
555
- this.cdr.markForCheck();
556
- }
557
- }
558
- ngOnChanges(changes) {
559
- this.cdr.markForCheck();
560
- }
561
- ngOnDestroy() {
562
- this.ngControl.control?.disable();
563
- }
564
- }
565
- 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 });
566
- OnshoreFormSwitchItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormSwitchItemComponent, selector: "onshore-form-switch-item", inputs: { formTemplate: "formTemplate", actionButtonDisabled: "actionButtonDisabled" }, outputs: { valueChange: "valueChange", actionButtonClick: "actionButtonClick" }, usesOnChanges: true, ngImport: i0, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n <div class=\"h-full align-items-center mt-1\">\n <p-inputSwitch [name]=\"formTemplate.name\"\n [formControl]=\"ngControl.control\"\n [disabled]=\"disabled\"\n [inputId]=\"formTemplate.name\">\n </p-inputSwitch>\n </div>\n\n</onshore-form-item-container>\n", dependencies: [{ 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: i2$2.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy"], outputs: ["onChange"] }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
567
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormSwitchItemComponent, decorators: [{
568
- type: Component,
569
- args: [{ selector: 'onshore-form-switch-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n <div class=\"h-full align-items-center mt-1\">\n <p-inputSwitch [name]=\"formTemplate.name\"\n [formControl]=\"ngControl.control\"\n [disabled]=\"disabled\"\n [inputId]=\"formTemplate.name\">\n </p-inputSwitch>\n </div>\n\n</onshore-form-item-container>\n" }]
570
- }], ctorParameters: function () { return [{ type: i1$1.NgControl, decorators: [{
571
- type: Self
572
- }, {
573
- type: Optional
574
- }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formTemplate: [{
575
- type: Input
576
- }], actionButtonDisabled: [{
577
- type: Input
578
- }], valueChange: [{
579
- type: Output
580
- }], actionButtonClick: [{
581
- type: Output
582
- }] } });
583
-
584
- class OnshoreImagePlaceholderComponent {
585
- constructor() {
586
- this.placeholderIcon = '';
587
- this.placeholderImage = '';
588
- this.image = '';
589
- this.imageStyle = '';
590
- this.placeholderStyle = '';
591
- this.showLoader = true;
592
- this.imageLoaded = false;
593
- }
594
- loadReady() {
595
- this.imageLoaded = true;
596
- this.showLoader = false;
597
- }
598
- abort() {
599
- this.imageLoaded = false;
600
- this.showLoader = false;
601
- }
602
- }
603
- OnshoreImagePlaceholderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreImagePlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
604
- OnshoreImagePlaceholderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreImagePlaceholderComponent, selector: "onshore-image-placeholder", inputs: { placeholderIcon: "placeholderIcon", placeholderImage: "placeholderImage", image: "image", imageStyle: "imageStyle", placeholderStyle: "placeholderStyle", showLoader: "showLoader" }, ngImport: i0, template: "<div [hidden]=\"!imageLoaded || !image\">\n <img [style]=\"imageStyle\" [src]=\"image\" (load)=\"loadReady()\" (abort)=\"abort()\" />\n</div>\n\n<div *ngIf=\"!imageLoaded || !image\" class=\"flex justify-content-center align-items-center\" [style]=\"placeholderStyle\" [class.bg-gray-200]=\"placeholderIcon\" [class.p-2]=\"placeholderIcon\">\n <i *ngIf=\"placeholderIcon\" [class]=\"'text-muted fa ' + placeholderIcon\" [class.opacity-20]=\"showLoader && image\"></i>\n <img *ngIf=\"placeholderImage\" [src]=\"placeholderImage\" [class.opacity-20]=\"showLoader && image\" class=\"h-full\" />\n <i *ngIf=\"showLoader && image\" class=\"fas fa-circle-notch fa-spin fa-2x absolute\"></i>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
605
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreImagePlaceholderComponent, decorators: [{
606
- type: Component,
607
- args: [{ selector: 'onshore-image-placeholder', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [hidden]=\"!imageLoaded || !image\">\n <img [style]=\"imageStyle\" [src]=\"image\" (load)=\"loadReady()\" (abort)=\"abort()\" />\n</div>\n\n<div *ngIf=\"!imageLoaded || !image\" class=\"flex justify-content-center align-items-center\" [style]=\"placeholderStyle\" [class.bg-gray-200]=\"placeholderIcon\" [class.p-2]=\"placeholderIcon\">\n <i *ngIf=\"placeholderIcon\" [class]=\"'text-muted fa ' + placeholderIcon\" [class.opacity-20]=\"showLoader && image\"></i>\n <img *ngIf=\"placeholderImage\" [src]=\"placeholderImage\" [class.opacity-20]=\"showLoader && image\" class=\"h-full\" />\n <i *ngIf=\"showLoader && image\" class=\"fas fa-circle-notch fa-spin fa-2x absolute\"></i>\n</div>\n" }]
608
- }], ctorParameters: function () { return []; }, propDecorators: { placeholderIcon: [{
609
- type: Input
610
- }], placeholderImage: [{
611
- type: Input
612
- }], image: [{
613
- type: Input
614
- }], imageStyle: [{
615
- type: Input
616
- }], placeholderStyle: [{
617
- type: Input
618
- }], showLoader: [{
619
- type: Input
620
- }] } });
621
-
622
- class OnshoreImageChooserComponent {
623
- constructor(cdr) {
624
- this.cdr = cdr;
625
- this.drag = false;
626
- this.image = '';
627
- this.finalImage = '';
628
- this.imageErrorType = OnshoreImageError;
629
- this.imageError = OnshoreImageError.none;
630
- this.choosen = new EventEmitter();
631
- this.canceled = new EventEmitter();
632
- }
633
- clear() {
634
- this.image = '';
635
- this.finalImage = '';
636
- this.imageError = OnshoreImageError.none;
637
- }
638
- fileChange(event) {
639
- this.imageError = OnshoreImageError.none;
640
- const target = event.target;
641
- const file = target?.files ? target?.files[0] : null;
642
- if (file?.type != 'image/png' && file?.type != 'image/jpeg' && file?.type != 'image/webp') {
643
- this.imageError = OnshoreImageError.fileType;
644
- return;
645
- }
646
- if (file?.size > this.imageSettings.maxFileSize) {
647
- this.imageError = OnshoreImageError.size;
648
- return;
649
- }
650
- if (file) {
651
- const reader = new FileReader();
652
- reader.readAsDataURL(file);
653
- reader.onload = () => {
654
- const img = new Image();
655
- img.src = window.URL.createObjectURL(file);
656
- img.onload = () => {
657
- const originalWidth = img.width;
658
- const originalHeight = img.height;
659
- if (originalWidth >= this.imageSettings.imageWidth && originalHeight >= this.imageSettings.imageHeight) {
660
- this.image = reader.result?.toString() || '';
661
- }
662
- else {
663
- this.imageError = OnshoreImageError.ratio;
664
- }
665
- this.cdr.markForCheck();
666
- };
667
- };
668
- }
669
- }
670
- imageCropped(event) {
671
- // ToDo: Check needed base64 format
672
- //this.finalImage = event.base64.split(',')[1];
673
- this.finalImage = event.base64 || '';
674
- }
675
- imageCroppedReady() {
676
- this.choosen.emit(this.finalImage);
677
- this.clear();
678
- }
679
- }
680
- OnshoreImageChooserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreImageChooserComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
681
- OnshoreImageChooserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreImageChooserComponent, selector: "onshore-image-chooser", inputs: { imageSettings: "imageSettings" }, outputs: { choosen: "choosen", canceled: "canceled" }, ngImport: i0, template: "<div class=\"flex flex-column justify-content-center align-items-center w-full\">\n\n <div *ngIf=\"!image\" class=\"flex justify-content-center flex-column align-items-center w-full\">\n <div\n class=\"onshore-image-upload flex flex-column justify-content-between align-items-center rounded-lg p-4 relative m-3\"\n [class.onshore-border-gray-3]=\"drag\"\n [class.onshore-border-danger]=\"imageError != imageErrorType.none\">\n <i class=\"fa fa-image fa-5x onshore-color-gray-4\"></i>\n <small class=\"onshore-color-gray-4 mb-2\">{{'form.imageControl.dropImageLabel' | translate}}</small>\n\n <button pButton\n type=\"button\"\n icon=\"fa fa-file\"\n [label]=\"'form.imageControl.imageChooserFileButton' | translate\"\n class=\"onshore-button-primary mr-2\">\n </button>\n\n <input\n (change)=\"fileChange($event)\"\n *ngIf=\"!image\"\n accept=\"image/png, image/jpeg, image/webp\"\n class=\"onshore-image-input absolute w-full h-full\"\n type=\"file\"\n (dragenter)=\"drag = true\"\n (dragleave)=\"drag = false\"\n (dragend)=\"drag = false\"\n />\n </div>\n </div>\n\n <div class=\"flex flex-column relative align-items-center w-full\" *ngIf=\"image\">\n <image-cropper\n class=\"m-3\"\n [style]=\"'align-items: center; height: ' + (imageSettings.cropperPreviewHeight * this.imageSettings.aspectRatio) + 'px; width: ' + (imageSettings.cropperPreviewWidth * this.imageSettings.aspectRatio) + 'px'\"\n [class.onshore-cropper-circle]=\"this.imageSettings.circleCropper\"\n (imageCropped)=\"imageCropped($event)\"\n [imageBase64]=\"image\"\n [imageQuality]=\"this.imageSettings.imageQuality\"\n [alignImage]=\"this.imageSettings.alignImage\"\n [backgroundColor]=\"this.imageSettings.backgroundColor\"\n [containWithinAspectRatio]=\"this.imageSettings.containWithinAspectRatio\"\n [format]=\"this.imageSettings.format\"\n [aspectRatio]=\"this.imageSettings.aspectRatio\"\n [resizeToHeight]=\"this.imageSettings.imageWidth * this.imageSettings.aspectRatio\"\n [resizeToWidth]=\"this.imageSettings.imageHeight * this.imageSettings.aspectRatio\">\n </image-cropper>\n </div>\n\n <div *ngIf=\"imageError\"class=\"pb-2 text-wrap text-center onshore-color-danger\">\n <small *ngIf=\"imageError == imageErrorType.ratio\">{{'form.imageControl.imageErrorRatio' | translate: {resizeToWidth: this.imageSettings.imageWidth, resizeToHeight: this.imageSettings.imageHeight} }}</small>\n <small *ngIf=\"imageError == imageErrorType.fileType\">{{'form.imageControl.imageErrorFileType' | translate}}</small>\n <small *ngIf=\"imageError == imageErrorType.size\">{{'form.imageControl.imageErrorSize' | translate}}</small>\n </div>\n</div>\n\n\n<p-footer>\n <div class=\"flex justify-content-end align-items-center mt-2\">\n <button pButton\n type=\"button\"\n icon=\"fa fa-times\"\n [label]=\"'form.imageControl.imageChooserCancelButton' | translate\"\n class=\"onshore-button-light mr-2\"\n (click)=\"clear(); canceled.emit(true)\">\n </button>\n\n <button pButton\n type=\"button\"\n [label]=\"'form.imageControl.imageChooserSelectButton' | translate\"\n class=\"onshore-button-primary\"\n icon=\"fa fa-check\"\n [disabled]=\"!image\"\n (click)=\"imageCroppedReady()\">\n </button>\n </div>\n</p-footer>\n\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "component", type: i3$2.Footer, selector: "p-footer" }, { kind: "component", type: i4$2.ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "format", "transform", "maintainAspectRatio", "aspectRatio", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "autoCrop", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "cropper", "alignImage", "disabled"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
682
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreImageChooserComponent, decorators: [{
683
- type: Component,
684
- args: [{ selector: 'onshore-image-chooser', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-column justify-content-center align-items-center w-full\">\n\n <div *ngIf=\"!image\" class=\"flex justify-content-center flex-column align-items-center w-full\">\n <div\n class=\"onshore-image-upload flex flex-column justify-content-between align-items-center rounded-lg p-4 relative m-3\"\n [class.onshore-border-gray-3]=\"drag\"\n [class.onshore-border-danger]=\"imageError != imageErrorType.none\">\n <i class=\"fa fa-image fa-5x onshore-color-gray-4\"></i>\n <small class=\"onshore-color-gray-4 mb-2\">{{'form.imageControl.dropImageLabel' | translate}}</small>\n\n <button pButton\n type=\"button\"\n icon=\"fa fa-file\"\n [label]=\"'form.imageControl.imageChooserFileButton' | translate\"\n class=\"onshore-button-primary mr-2\">\n </button>\n\n <input\n (change)=\"fileChange($event)\"\n *ngIf=\"!image\"\n accept=\"image/png, image/jpeg, image/webp\"\n class=\"onshore-image-input absolute w-full h-full\"\n type=\"file\"\n (dragenter)=\"drag = true\"\n (dragleave)=\"drag = false\"\n (dragend)=\"drag = false\"\n />\n </div>\n </div>\n\n <div class=\"flex flex-column relative align-items-center w-full\" *ngIf=\"image\">\n <image-cropper\n class=\"m-3\"\n [style]=\"'align-items: center; height: ' + (imageSettings.cropperPreviewHeight * this.imageSettings.aspectRatio) + 'px; width: ' + (imageSettings.cropperPreviewWidth * this.imageSettings.aspectRatio) + 'px'\"\n [class.onshore-cropper-circle]=\"this.imageSettings.circleCropper\"\n (imageCropped)=\"imageCropped($event)\"\n [imageBase64]=\"image\"\n [imageQuality]=\"this.imageSettings.imageQuality\"\n [alignImage]=\"this.imageSettings.alignImage\"\n [backgroundColor]=\"this.imageSettings.backgroundColor\"\n [containWithinAspectRatio]=\"this.imageSettings.containWithinAspectRatio\"\n [format]=\"this.imageSettings.format\"\n [aspectRatio]=\"this.imageSettings.aspectRatio\"\n [resizeToHeight]=\"this.imageSettings.imageWidth * this.imageSettings.aspectRatio\"\n [resizeToWidth]=\"this.imageSettings.imageHeight * this.imageSettings.aspectRatio\">\n </image-cropper>\n </div>\n\n <div *ngIf=\"imageError\"class=\"pb-2 text-wrap text-center onshore-color-danger\">\n <small *ngIf=\"imageError == imageErrorType.ratio\">{{'form.imageControl.imageErrorRatio' | translate: {resizeToWidth: this.imageSettings.imageWidth, resizeToHeight: this.imageSettings.imageHeight} }}</small>\n <small *ngIf=\"imageError == imageErrorType.fileType\">{{'form.imageControl.imageErrorFileType' | translate}}</small>\n <small *ngIf=\"imageError == imageErrorType.size\">{{'form.imageControl.imageErrorSize' | translate}}</small>\n </div>\n</div>\n\n\n<p-footer>\n <div class=\"flex justify-content-end align-items-center mt-2\">\n <button pButton\n type=\"button\"\n icon=\"fa fa-times\"\n [label]=\"'form.imageControl.imageChooserCancelButton' | translate\"\n class=\"onshore-button-light mr-2\"\n (click)=\"clear(); canceled.emit(true)\">\n </button>\n\n <button pButton\n type=\"button\"\n [label]=\"'form.imageControl.imageChooserSelectButton' | translate\"\n class=\"onshore-button-primary\"\n icon=\"fa fa-check\"\n [disabled]=\"!image\"\n (click)=\"imageCroppedReady()\">\n </button>\n </div>\n</p-footer>\n\n" }]
685
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { imageSettings: [{
686
- type: Input
687
- }], choosen: [{
688
- type: Output
689
- }], canceled: [{
690
- type: Output
691
- }] } });
692
-
693
- class WebcamComponent {
694
- constructor(cdr) {
695
- this.cdr = cdr;
696
- this.shot = new EventEmitter();
697
- this.canceled = new EventEmitter();
698
- this.image = '';
699
- this.finalImage = '';
700
- this.trigger = new Subject();
701
- }
702
- camImageShot(webcamImage) {
703
- this.image = webcamImage.imageAsDataUrl;
704
- this.cdr.markForCheck();
705
- }
706
- imageCropped(event) {
707
- // ToDo: Check needed base64 format
708
- this.finalImage = event.base64 || '';
709
- }
710
- imageCroppedReady() {
711
- this.shot.emit(this.finalImage);
712
- }
713
- get triggerObservable() {
714
- return this.trigger.asObservable();
715
- }
716
- triggerSnapshot() {
717
- this.trigger.next();
718
- }
719
- }
720
- WebcamComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: WebcamComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
721
- WebcamComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: WebcamComponent, selector: "onshore-webcam", inputs: { imageSettings: "imageSettings" }, outputs: { shot: "shot", canceled: "canceled" }, ngImport: i0, template: "<div class=\"flex w-full justify-content-center align-items-center overflow-hidden p-2\">\n <webcam *ngIf=\"!image || image == ''\"\n [mirrorImage]=\"'never'\"\n [height]=\"imageSettings.webcamWidth * this.imageSettings.aspectRatio\"\n [width]=\"imageSettings.webcamHeight * this.imageSettings.aspectRatio\"\n [allowCameraSwitch]=\"true\"\n [trigger]=\"triggerObservable\"\n [imageQuality]=\"imageSettings.imageQuality / 100\"\n (imageCapture)=\"camImageShot($event)\">\n </webcam>\n\n <image-cropper *ngIf=\"image && image != ''\"\n class=\"m-3\" [style]=\"'height: ' + (imageSettings.cropperPreviewWidth * this.imageSettings.aspectRatio) + 'px; width: ' + (imageSettings.cropperPreviewHeight * this.imageSettings.aspectRatio) + 'px'\"\n [class.onshore-cropper-circle]=\"imageSettings.circleCropper\"\n (imageCropped)=\"imageCropped($event)\"\n [imageBase64]=\"image\"\n [imageQuality]=\"imageSettings.imageQuality\"\n [alignImage]=\"imageSettings.alignImage\"\n [backgroundColor]=\"imageSettings.backgroundColor\"\n [containWithinAspectRatio]=\"imageSettings.containWithinAspectRatio\"\n [format]=\"imageSettings.format\"\n [aspectRatio]=\"imageSettings.aspectRatio\"\n [resizeToHeight]=\"imageSettings.imageHeight * this.imageSettings.aspectRatio\"\n [resizeToWidth]=\"this.imageSettings.imageWidth * this.imageSettings.aspectRatio\">\n </image-cropper>\n</div>\n\n<p-footer>\n <div class=\"flex justify-content-end align-items-center mt-2\">\n\n <button pButton\n type=\"button\"\n icon=\"fa fa-times\"\n [label]=\"'global.cancel' | translate\"\n class=\"onshore-button-light mr-2\"\n (click)=\"canceled.emit(true)\">\n </button>\n\n <button *ngIf=\"!image || image == ''\"\n pButton\n type=\"button\"\n [label]=\"'form.imageControl.webcamSmileButton' | translate\"\n class=\"onshore-button-primary\"\n icon=\"fa fa-laugh-wink\"\n (click)=\"triggerSnapshot()\">\n </button>\n\n <button *ngIf=\"image && image != ''\"\n pButton\n type=\"button\"\n [label]=\"'global.use' | translate\"\n class=\"onshore-button-primary\"\n icon=\"fa fa-check\"\n (click)=\"imageCroppedReady()\">\n </button>\n </div>\n</p-footer>\n\n\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "component", type: i3$2.Footer, selector: "p-footer" }, { kind: "component", type: i4$2.ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "format", "transform", "maintainAspectRatio", "aspectRatio", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "autoCrop", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "cropper", "alignImage", "disabled"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange"] }, { kind: "component", type: i5$1.WebcamComponent, selector: "webcam", inputs: ["width", "height", "videoOptions", "allowCameraSwitch", "mirrorImage", "captureImageData", "imageType", "imageQuality", "trigger", "switchCamera"], outputs: ["imageCapture", "initError", "imageClick", "cameraSwitched"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
722
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: WebcamComponent, decorators: [{
723
- type: Component,
724
- args: [{ selector: 'onshore-webcam', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex w-full justify-content-center align-items-center overflow-hidden p-2\">\n <webcam *ngIf=\"!image || image == ''\"\n [mirrorImage]=\"'never'\"\n [height]=\"imageSettings.webcamWidth * this.imageSettings.aspectRatio\"\n [width]=\"imageSettings.webcamHeight * this.imageSettings.aspectRatio\"\n [allowCameraSwitch]=\"true\"\n [trigger]=\"triggerObservable\"\n [imageQuality]=\"imageSettings.imageQuality / 100\"\n (imageCapture)=\"camImageShot($event)\">\n </webcam>\n\n <image-cropper *ngIf=\"image && image != ''\"\n class=\"m-3\" [style]=\"'height: ' + (imageSettings.cropperPreviewWidth * this.imageSettings.aspectRatio) + 'px; width: ' + (imageSettings.cropperPreviewHeight * this.imageSettings.aspectRatio) + 'px'\"\n [class.onshore-cropper-circle]=\"imageSettings.circleCropper\"\n (imageCropped)=\"imageCropped($event)\"\n [imageBase64]=\"image\"\n [imageQuality]=\"imageSettings.imageQuality\"\n [alignImage]=\"imageSettings.alignImage\"\n [backgroundColor]=\"imageSettings.backgroundColor\"\n [containWithinAspectRatio]=\"imageSettings.containWithinAspectRatio\"\n [format]=\"imageSettings.format\"\n [aspectRatio]=\"imageSettings.aspectRatio\"\n [resizeToHeight]=\"imageSettings.imageHeight * this.imageSettings.aspectRatio\"\n [resizeToWidth]=\"this.imageSettings.imageWidth * this.imageSettings.aspectRatio\">\n </image-cropper>\n</div>\n\n<p-footer>\n <div class=\"flex justify-content-end align-items-center mt-2\">\n\n <button pButton\n type=\"button\"\n icon=\"fa fa-times\"\n [label]=\"'global.cancel' | translate\"\n class=\"onshore-button-light mr-2\"\n (click)=\"canceled.emit(true)\">\n </button>\n\n <button *ngIf=\"!image || image == ''\"\n pButton\n type=\"button\"\n [label]=\"'form.imageControl.webcamSmileButton' | translate\"\n class=\"onshore-button-primary\"\n icon=\"fa fa-laugh-wink\"\n (click)=\"triggerSnapshot()\">\n </button>\n\n <button *ngIf=\"image && image != ''\"\n pButton\n type=\"button\"\n [label]=\"'global.use' | translate\"\n class=\"onshore-button-primary\"\n icon=\"fa fa-check\"\n (click)=\"imageCroppedReady()\">\n </button>\n </div>\n</p-footer>\n\n\n" }]
725
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { imageSettings: [{
726
- type: Input
727
- }], shot: [{
728
- type: Output
729
- }], canceled: [{
730
- type: Output
731
- }] } });
732
-
733
- class OnshoreFormImageItemComponent {
734
- constructor(cdr, ngControl, dialogService) {
735
- this.cdr = cdr;
736
- this.ngControl = ngControl;
737
- this.dialogService = dialogService;
738
- this.actionButtonDisabled = false;
739
- this.imageDeleted = new EventEmitter();
740
- this.imageCleared = new EventEmitter();
741
- this.imageReady = new EventEmitter();
742
- this.selectFromMedia = new EventEmitter();
743
- this.isLoading = new EventEmitter();
744
- this.OnshoreFormTemplateLayout = OnshoreFormTemplateLayout;
745
- this.defaultImageSettings = {
746
- imageWidth: 400,
747
- imageHeight: 400,
748
- containWithinAspectRatio: false,
749
- aspectRatio: 1 / 1,
750
- imageSelectionEnabled: true,
751
- webcamSelectionEnabled: true,
752
- mediaSelectionEnabled: true,
753
- deleteEnabled: true,
754
- placeholderImage: '',
755
- placeholderIcon: 'fa fa-image fa-10x',
756
- containerWidth: 250,
757
- containerHeight: 250,
758
- imageQuality: 100,
759
- format: 'png',
760
- alignImage: 'center',
761
- cropperPreviewWidth: 400,
762
- cropperPreviewHeight: 400,
763
- webcamWidth: 400,
764
- webcamHeight: 400,
765
- circleCropper: false,
766
- maxFileSize: 6400000,
767
- backgroundColor: 'white'
768
- };
769
- this.image = '';
770
- this.disabled = false;
771
- this.webcamDialogVisible = false;
772
- this.imageChooserDialogVisible = false;
773
- this.subscriptions = [];
774
- this.ngControl.valueAccessor = this;
775
- }
776
- getFileImage(image) {
777
- this.imageChooserDialogVisible = false;
778
- if (image) {
779
- this.image = image;
780
- setTimeout(() => {
781
- this.ngControl?.control?.setValue(this.image);
782
- this.ngControl?.control?.markAsDirty();
783
- this.imageReady.emit(this.image);
784
- this.cdr.markForCheck();
785
- }, 500);
786
- }
787
- }
788
- getWebcamImage(image) {
789
- this.webcamDialogVisible = false;
790
- if (image) {
791
- this.image = image;
792
- setTimeout(() => {
793
- this.ngControl?.control?.setValue(this.image);
794
- this.ngControl?.control?.markAsDirty();
795
- this.imageReady.emit(this.image);
796
- this.cdr.markForCheck();
797
- }, 500);
798
- }
799
- }
800
- removeImage() {
801
- if (this.image && !this.image.includes('base64')) {
802
- this.imageDeleted.emit(this.image);
803
- }
804
- else {
805
- this.imageCleared.emit();
806
- }
807
- this.ngControl?.control?.setValue(null);
808
- this.ngControl?.control?.markAsDirty();
809
- this.image = '';
810
- this.cdr.markForCheck();
811
- }
812
- writeValue(obj) {
813
- if (obj && !obj.includes('base64')) {
814
- this.image = obj;
815
- }
816
- if (obj == null) {
817
- this.image = '';
818
- }
819
- this.imageReady.emit(this.image);
820
- this.cdr.markForCheck();
821
- }
822
- registerOnChange(fn) {
823
- if (this.ngControl.value) {
824
- this.image = this.ngControl.value;
825
- this.cdr.markForCheck();
826
- }
827
- }
828
- registerOnTouched(fn) { }
829
- setDisabledState(isDisabled) {
830
- this.disabled = isDisabled;
831
- this.cdr.markForCheck();
832
- }
833
- ngOnInit() {
834
- if (this.ngControl?.control?.value == '' && this.formTemplate.default != undefined) {
835
- this.ngControl?.control?.setValue(this.formTemplate.default);
836
- this.cdr.markForCheck();
837
- }
838
- }
839
- ngOnDestroy() {
840
- this.subscriptions.forEach((subscription) => {
841
- subscription.unsubscribe();
842
- });
843
- this.ngControl?.control?.disable();
844
- this.image = null;
845
- }
846
- ngOnChanges(changes) {
847
- const imageSettings = changes['imageSettings']?.currentValue;
848
- this.imageSettings = {
849
- ...this.defaultImageSettings,
850
- ...imageSettings,
851
- placeholderIcon: imageSettings?.placeholderImage ? '' : (imageSettings?.placeholderIcon ?? this.defaultImageSettings.placeholderIcon)
852
- };
853
- //this.removeImage();
854
- this.cdr.markForCheck();
855
- }
856
- }
857
- 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$3.DialogService }], target: i0.ɵɵFactoryTarget.Component });
858
- OnshoreFormImageItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormImageItemComponent, selector: "onshore-form-image-item", inputs: { formTemplate: "formTemplate", imageSettings: "imageSettings", actionButtonDisabled: "actionButtonDisabled" }, outputs: { imageDeleted: "imageDeleted", imageCleared: "imageCleared", imageReady: "imageReady", selectFromMedia: "selectFromMedia", isLoading: "isLoading" }, usesOnChanges: true, ngImport: i0, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\" [ngControl]=\"ngControl\">\n <div class=\"w-full flex align-items-center\" [class.flex-column]=\"formTemplate.layout === OnshoreFormTemplateLayout.vertical\">\n\n <div class=\"onshore-border-gray-4 border-solid border-1 overflow-hidden\"\n [style]=\"'background-color: white; width: ' + imageSettings.containerWidth + 'px; height: ' + imageSettings.containerHeight + 'px'\">\n <onshore-image-placeholder\n class=\"w-full\"\n [image]=\"image\"\n [imageStyle]=\"'width: 100%; height: 100%'\"\n [placeholderIcon]=\"imageSettings.placeholderIcon\"\n [placeholderImage]=\"imageSettings.placeholderImage\"\n [placeholderStyle]=\"'width: 100%; height: 100%'\">\n </onshore-image-placeholder>\n </div>\n\n <div class=\"flex flex-column m-4\">\n <button pButton\n type=\"button\"\n *ngIf=\"imageSettings.imageSelectionEnabled\"\n icon=\"fa fa-image\"\n [label]=\"'form.imageControl.uploadImageButton' | translate\"\n class=\"onshore-button-primary mb-2\"\n [disabled]=\"disabled\"\n (click)=\"imageChooserDialogVisible = true; cdr.detectChanges()\">\n </button>\n\n <button pButton\n type=\"button\"\n *ngIf=\"imageSettings.webcamSelectionEnabled\"\n icon=\"fa fa-camera\"\n [label]=\"'form.imageControl.webcamImageButton' | translate\"\n class=\"onshore-button-light mb-2\"\n [disabled]=\"disabled\"\n (click)=\"webcamDialogVisible = true\">\n </button>\n\n <button pButton\n type=\"button\"\n *ngIf=\"imageSettings.mediaSelectionEnabled\"\n icon=\"fa fa-photo-video\"\n [label]=\"'form.imageControl.mediaImageButton' | translate\"\n class=\"onshore-button-light mb-2\"\n [disabled]=\"disabled\"\n (click)=\"selectFromMedia.emit()\">\n </button>\n\n <button pButton\n type=\"button\"\n *ngIf=\"imageSettings.deleteEnabled\"\n icon=\"fa fa-eraser\"\n [label]=\"'form.imageControl.removeImageButton' | translate\"\n class=\"onshore-button-light\"\n (click)=\"removeImage()\"\n [disabled]=\"!image || disabled\">\n </button>\n\n </div>\n\n </div>\n</onshore-form-item-container>\n\n<p-dialog [header]=\"'form.imageControl.uploadImageTitle' | translate\" [(visible)]=\"imageChooserDialogVisible\" [modal]=\"true\" [style]=\"{'max-width': '50vw'}\" appendTo=\"body\">\n <onshore-image-chooser\n (choosen)=\"getFileImage($event)\"\n (canceled)=\"imageChooserDialogVisible = false\"\n [imageSettings]=\"imageSettings\">\n </onshore-image-chooser>\n</p-dialog>\n\n<p-dialog [header]=\"'form.imageControl.webacmImageTitle' | translate\" [(visible)]=\"webcamDialogVisible\" [modal]=\"true\" [style]=\"{'max-width': '50vw'}\" appendTo=\"body\">\n <onshore-webcam\n *ngIf=\"webcamDialogVisible\"\n (shot)=\"getWebcamImage($event)\"\n (canceled)=\"webcamDialogVisible = false\"\n [imageSettings]=\"imageSettings\"></onshore-webcam>\n</p-dialog>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "component", type: i5$2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: OnshoreImagePlaceholderComponent, selector: "onshore-image-placeholder", inputs: ["placeholderIcon", "placeholderImage", "image", "imageStyle", "placeholderStyle", "showLoader"] }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }, { kind: "component", type: OnshoreImageChooserComponent, selector: "onshore-image-chooser", inputs: ["imageSettings"], outputs: ["choosen", "canceled"] }, { kind: "component", type: WebcamComponent, selector: "onshore-webcam", inputs: ["imageSettings"], outputs: ["shot", "canceled"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
859
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormImageItemComponent, decorators: [{
860
- type: Component,
861
- args: [{ selector: 'onshore-form-image-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\" [ngControl]=\"ngControl\">\n <div class=\"w-full flex align-items-center\" [class.flex-column]=\"formTemplate.layout === OnshoreFormTemplateLayout.vertical\">\n\n <div class=\"onshore-border-gray-4 border-solid border-1 overflow-hidden\"\n [style]=\"'background-color: white; width: ' + imageSettings.containerWidth + 'px; height: ' + imageSettings.containerHeight + 'px'\">\n <onshore-image-placeholder\n class=\"w-full\"\n [image]=\"image\"\n [imageStyle]=\"'width: 100%; height: 100%'\"\n [placeholderIcon]=\"imageSettings.placeholderIcon\"\n [placeholderImage]=\"imageSettings.placeholderImage\"\n [placeholderStyle]=\"'width: 100%; height: 100%'\">\n </onshore-image-placeholder>\n </div>\n\n <div class=\"flex flex-column m-4\">\n <button pButton\n type=\"button\"\n *ngIf=\"imageSettings.imageSelectionEnabled\"\n icon=\"fa fa-image\"\n [label]=\"'form.imageControl.uploadImageButton' | translate\"\n class=\"onshore-button-primary mb-2\"\n [disabled]=\"disabled\"\n (click)=\"imageChooserDialogVisible = true; cdr.detectChanges()\">\n </button>\n\n <button pButton\n type=\"button\"\n *ngIf=\"imageSettings.webcamSelectionEnabled\"\n icon=\"fa fa-camera\"\n [label]=\"'form.imageControl.webcamImageButton' | translate\"\n class=\"onshore-button-light mb-2\"\n [disabled]=\"disabled\"\n (click)=\"webcamDialogVisible = true\">\n </button>\n\n <button pButton\n type=\"button\"\n *ngIf=\"imageSettings.mediaSelectionEnabled\"\n icon=\"fa fa-photo-video\"\n [label]=\"'form.imageControl.mediaImageButton' | translate\"\n class=\"onshore-button-light mb-2\"\n [disabled]=\"disabled\"\n (click)=\"selectFromMedia.emit()\">\n </button>\n\n <button pButton\n type=\"button\"\n *ngIf=\"imageSettings.deleteEnabled\"\n icon=\"fa fa-eraser\"\n [label]=\"'form.imageControl.removeImageButton' | translate\"\n class=\"onshore-button-light\"\n (click)=\"removeImage()\"\n [disabled]=\"!image || disabled\">\n </button>\n\n </div>\n\n </div>\n</onshore-form-item-container>\n\n<p-dialog [header]=\"'form.imageControl.uploadImageTitle' | translate\" [(visible)]=\"imageChooserDialogVisible\" [modal]=\"true\" [style]=\"{'max-width': '50vw'}\" appendTo=\"body\">\n <onshore-image-chooser\n (choosen)=\"getFileImage($event)\"\n (canceled)=\"imageChooserDialogVisible = false\"\n [imageSettings]=\"imageSettings\">\n </onshore-image-chooser>\n</p-dialog>\n\n<p-dialog [header]=\"'form.imageControl.webacmImageTitle' | translate\" [(visible)]=\"webcamDialogVisible\" [modal]=\"true\" [style]=\"{'max-width': '50vw'}\" appendTo=\"body\">\n <onshore-webcam\n *ngIf=\"webcamDialogVisible\"\n (shot)=\"getWebcamImage($event)\"\n (canceled)=\"webcamDialogVisible = false\"\n [imageSettings]=\"imageSettings\"></onshore-webcam>\n</p-dialog>\n" }]
862
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.NgControl, decorators: [{
863
- type: Self
864
- }, {
865
- type: Optional
866
- }] }, { type: i2$3.DialogService }]; }, propDecorators: { formTemplate: [{
867
- type: Input
868
- }], imageSettings: [{
869
- type: Input
870
- }], actionButtonDisabled: [{
871
- type: Input
872
- }], imageDeleted: [{
873
- type: Output
874
- }], imageCleared: [{
875
- type: Output
876
- }], imageReady: [{
877
- type: Output
878
- }], selectFromMedia: [{
879
- type: Output
880
- }], isLoading: [{
881
- type: Output
882
- }] } });
883
-
884
- class OnshoreFormDropdownItemComponent {
885
- constructor(ngControl, cdr) {
886
- this.ngControl = ngControl;
887
- this.cdr = cdr;
888
- this.multiple = false;
889
- this.showClear = false;
890
- this.group = false;
891
- this.selectionLimit = 0;
892
- this.minLength = 0;
893
- this.optionLabel = '';
894
- this.optionGroupLabel = '';
895
- this.dataKey = '';
896
- this.actionButtonDisabled = false;
897
- this.valueChange = new EventEmitter();
898
- this.actionButtonClick = new EventEmitter();
899
- this.disabled = false;
900
- this.ngControl.valueAccessor = this;
901
- }
902
- // ControlValueAccessor interface
903
- writeValue(obj) {
904
- if (obj) {
905
- this.cdr.markForCheck();
906
- }
907
- }
908
- registerOnChange(fn) {
909
- if (this.ngControl.value) {
910
- this.cdr.markForCheck();
911
- }
912
- }
913
- registerOnTouched(fn) { }
914
- setDisabledState(isDisabled) {
915
- this.disabled = isDisabled;
916
- }
917
- clearSelection() {
918
- this.ngControl.control?.reset();
919
- this.ngControl.control?.setValue(this.multiple ? [] : '');
920
- this.cdr.markForCheck();
921
- }
922
- ngOnInit() {
923
- if ((!this.ngControl.control?.value || this.ngControl.control?.value == '' || this.ngControl.control?.value == undefined) && !this.multiple) {
924
- this.ngControl.control?.setValue(this.formTemplate.default);
925
- this.cdr.markForCheck();
926
- }
927
- }
928
- ngOnDestroy() {
929
- this.ngControl.control?.disable();
930
- }
931
- ngOnChanges(changes) {
932
- const currentOptions = changes['options']?.currentValue ?? changes['formTemplate']?.currentValue?.options;
933
- //const previousOptions = changes['options']?.previousValue ?? changes['formTemplate']?.previousValue?.options;
934
- if (!this.options && currentOptions) {
935
- this.options = currentOptions;
936
- }
937
- this.cdr.markForCheck();
938
- }
939
- }
940
- 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 });
941
- OnshoreFormDropdownItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormDropdownItemComponent, selector: "onshore-form-dropdown-item", inputs: { formTemplate: "formTemplate", multiple: "multiple", showClear: "showClear", group: "group", selectionLimit: "selectionLimit", minLength: "minLength", optionLabel: "optionLabel", optionGroupLabel: "optionGroupLabel", dataKey: "dataKey", actionButtonDisabled: "actionButtonDisabled", options: "options" }, outputs: { valueChange: "valueChange", actionButtonClick: "actionButtonClick" }, usesOnChanges: true, ngImport: i0, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n\n <p-dropdown *ngIf=\"!multiple\"\n class=\"w-full\"\n [options]=\"options\"\n [formControl]=\"ngControl.control\"\n [name]=\"formTemplate?.name\"\n [placeholder]=\"formTemplate?.placeholder\"\n [disabled]=\"disabled\"\n [optionLabel]=\"optionLabel\"\n [dataKey]=\"dataKey\"\n [optionGroupLabel]=\"optionGroupLabel\"\n [group]=\"group\"\n [showClear]=\"showClear && formTemplate?.placeholder\"\n (onClear)=\"clearSelection()\"\n optionDisabled=\"disabled\"\n appendTo=\"body\">\n </p-dropdown>\n\n <p-multiSelect *ngIf=\"multiple\"\n class=\"w-full\"\n [options]=\"options\"\n [formControl]=\"ngControl.control\"\n [name]=\"formTemplate?.name\"\n [placeholder]=\"formTemplate?.placeholder\"\n [disabled]=\"disabled\"\n [showClear]=\"showClear\"\n [selectionLimit]=\"selectionLimit\"\n [minlength]=\"minLength\"\n [optionLabel]=\"optionLabel\"\n [dataKey]=\"dataKey\"\n [optionGroupLabel]=\"optionGroupLabel\"\n [group]=\"group\"\n (onClear)=\"clearSelection()\"\n [selectedItemsLabel]=\"'form.dropdownControl.selectedItems' | translate\"\n optionDisabled=\"disabled\"\n appendTo=\"body\"></p-multiSelect>\n\n</onshore-form-item-container>\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.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3$3.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: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
942
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormDropdownItemComponent, decorators: [{
943
- type: Component,
944
- args: [{ selector: 'onshore-form-dropdown-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n\n <p-dropdown *ngIf=\"!multiple\"\n class=\"w-full\"\n [options]=\"options\"\n [formControl]=\"ngControl.control\"\n [name]=\"formTemplate?.name\"\n [placeholder]=\"formTemplate?.placeholder\"\n [disabled]=\"disabled\"\n [optionLabel]=\"optionLabel\"\n [dataKey]=\"dataKey\"\n [optionGroupLabel]=\"optionGroupLabel\"\n [group]=\"group\"\n [showClear]=\"showClear && formTemplate?.placeholder\"\n (onClear)=\"clearSelection()\"\n optionDisabled=\"disabled\"\n appendTo=\"body\">\n </p-dropdown>\n\n <p-multiSelect *ngIf=\"multiple\"\n class=\"w-full\"\n [options]=\"options\"\n [formControl]=\"ngControl.control\"\n [name]=\"formTemplate?.name\"\n [placeholder]=\"formTemplate?.placeholder\"\n [disabled]=\"disabled\"\n [showClear]=\"showClear\"\n [selectionLimit]=\"selectionLimit\"\n [minlength]=\"minLength\"\n [optionLabel]=\"optionLabel\"\n [dataKey]=\"dataKey\"\n [optionGroupLabel]=\"optionGroupLabel\"\n [group]=\"group\"\n (onClear)=\"clearSelection()\"\n [selectedItemsLabel]=\"'form.dropdownControl.selectedItems' | translate\"\n optionDisabled=\"disabled\"\n appendTo=\"body\"></p-multiSelect>\n\n</onshore-form-item-container>\n" }]
945
- }], ctorParameters: function () { return [{ type: i1$1.NgControl, decorators: [{
946
- type: Self
947
- }, {
948
- type: Optional
949
- }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formTemplate: [{
950
- type: Input
951
- }], multiple: [{
952
- type: Input
953
- }], showClear: [{
954
- type: Input
955
- }], group: [{
956
- type: Input
957
- }], selectionLimit: [{
958
- type: Input
959
- }], minLength: [{
960
- type: Input
961
- }], optionLabel: [{
962
- type: Input
963
- }], optionGroupLabel: [{
964
- type: Input
965
- }], dataKey: [{
966
- type: Input
967
- }], actionButtonDisabled: [{
968
- type: Input
969
- }], options: [{
970
- type: Input
971
- }], valueChange: [{
972
- type: Output
973
- }], actionButtonClick: [{
974
- type: Output
975
- }] } });
976
-
977
- class OnshoreFormColorpickerItemComponent {
978
- constructor(ngControl, cdr) {
979
- this.ngControl = ngControl;
980
- this.cdr = cdr;
981
- this.actionButtonDisabled = false;
982
- this.actionButtonClick = new EventEmitter();
983
- this.disabled = false;
984
- this.colorPickerValue = '';
985
- this.ngControl.valueAccessor = this;
986
- }
987
- // ControlValueAccessor interface
988
- writeValue(obj) { }
989
- registerOnChange(fn) { }
990
- registerOnTouched(fn) { }
991
- setDisabledState(isDisabled) {
992
- this.disabled = isDisabled;
993
- }
994
- changeColor() {
995
- this.ngControl.control?.setValue(this.colorPickerValue);
996
- this.ngControl?.control?.markAsDirty();
997
- this.cdr.markForCheck();
998
- }
999
- changeInput(input) {
1000
- this.colorPickerValue = input.target?.value;
1001
- }
1002
- ngOnInit() {
1003
- if (this.ngControl.control?.value == '' && this.formTemplate.default != undefined) {
1004
- this.ngControl.control?.setValue(this.formTemplate.default);
1005
- this.colorPickerValue = this.formTemplate.default;
1006
- this.cdr.markForCheck();
1007
- }
1008
- }
1009
- ngOnDestroy() {
1010
- this.ngControl.control?.disable();
1011
- }
1012
- ngOnChanges(changes) {
1013
- this.colorPickerValue = this.ngControl.control?.value;
1014
- this.cdr.markForCheck();
1015
- }
1016
- }
1017
- 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 });
1018
- OnshoreFormColorpickerItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormColorpickerItemComponent, selector: "onshore-form-colorpicker-item", inputs: { formTemplate: "formTemplate", actionButtonDisabled: "actionButtonDisabled" }, outputs: { actionButtonClick: "actionButtonClick" }, usesOnChanges: true, ngImport: i0, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n <div class=\"flex w-full\">\n\n <input class=\"w-full mr-2\"\n type=\"text\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [formControl]=\"ngControl.control\"\n [disabled]=\"disabled\"\n pInputText\n [value]=\"ngControl.control.value\"\n (input)=\"changeInput($event)\"/>\n\n <p-colorPicker [(ngModel)]=\"colorPickerValue\"\n format=\"hex\" [inline]=\"false\"\n appendTo=\"body\"\n [disabled]=\"disabled\"\n [baseZIndex]=\"99999\"\n (onChange)=\"changeColor()\">\n </p-colorPicker>\n </div>\n</onshore-form-item-container>\n", dependencies: [{ 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: i2$4.ColorPicker, selector: "p-colorPicker", inputs: ["style", "styleClass", "inline", "format", "appendTo", "disabled", "tabindex", "inputId", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onChange", "onShow", "onHide"] }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]" }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1019
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormColorpickerItemComponent, decorators: [{
1020
- type: Component,
1021
- args: [{ selector: 'onshore-form-colorpicker-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n <div class=\"flex w-full\">\n\n <input class=\"w-full mr-2\"\n type=\"text\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [formControl]=\"ngControl.control\"\n [disabled]=\"disabled\"\n pInputText\n [value]=\"ngControl.control.value\"\n (input)=\"changeInput($event)\"/>\n\n <p-colorPicker [(ngModel)]=\"colorPickerValue\"\n format=\"hex\" [inline]=\"false\"\n appendTo=\"body\"\n [disabled]=\"disabled\"\n [baseZIndex]=\"99999\"\n (onChange)=\"changeColor()\">\n </p-colorPicker>\n </div>\n</onshore-form-item-container>\n" }]
1022
- }], ctorParameters: function () { return [{ type: i1$1.NgControl, decorators: [{
1023
- type: Self
1024
- }, {
1025
- type: Optional
1026
- }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formTemplate: [{
1027
- type: Input
1028
- }], actionButtonDisabled: [{
1029
- type: Input
1030
- }], actionButtonClick: [{
1031
- type: Output
1032
- }] } });
1033
-
1034
- class OnshoreFormCheckboxItemComponent {
1035
- constructor(ngControl, cdr) {
1036
- this.ngControl = ngControl;
1037
- this.cdr = cdr;
1038
- this.actionButtonDisabled = false;
1039
- this.actionButtonClick = new EventEmitter();
1040
- this.disabled = false;
1041
- this.ngControl.valueAccessor = this;
1042
- }
1043
- // ControlValueAccessor interface
1044
- writeValue(obj) { }
1045
- registerOnChange(fn) { }
1046
- registerOnTouched(fn) { }
1047
- setDisabledState(isDisabled) {
1048
- this.disabled = isDisabled;
1049
- }
1050
- changeCheck(value) {
1051
- this.ngControl.control?.setValue(value.checked);
1052
- }
1053
- ngOnInit() {
1054
- if (this.ngControl.control?.value !== true && this.ngControl.control?.value !== false && this.formTemplate.default != undefined) {
1055
- this.ngControl.control?.setValue(this.formTemplate.default);
1056
- this.cdr.markForCheck();
1057
- }
1058
- }
1059
- ngOnChanges(changes) {
1060
- this.cdr.markForCheck();
1061
- }
1062
- ngOnDestroy() {
1063
- this.ngControl.control?.disable();
1064
- }
1065
- }
1066
- 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 });
1067
- OnshoreFormCheckboxItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormCheckboxItemComponent, selector: "onshore-form-checkbox-item", inputs: { formTemplate: "formTemplate", actionButtonDisabled: "actionButtonDisabled" }, outputs: { actionButtonClick: "actionButtonClick" }, usesOnChanges: true, ngImport: i0, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n\n <div class=\"p-field-checkbox flex\">\n <p-checkbox\n class=\"align-self-start mt-1\"\n [name]=\"formTemplate.name\"\n [formControl]=\"ngControl.control\"\n [binary]=\"true\"\n [disabled]=\"disabled\"\n [inputId]=\"formTemplate.name\"\n [value]=\"ngControl.control.value\"\n (onChange)=\"changeCheck($event)\">\n </p-checkbox>\n\n <label class=\"mb-0 ml-2 onshore-color-gray-5\"\n [for]=\"formTemplate.name\">\n {{formTemplate.description}}\n </label>\n </div>\n\n</onshore-form-item-container>\n", dependencies: [{ 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: i2$5.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: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1068
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormCheckboxItemComponent, decorators: [{
1069
- type: Component,
1070
- args: [{ selector: 'onshore-form-checkbox-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n\n <div class=\"p-field-checkbox flex\">\n <p-checkbox\n class=\"align-self-start mt-1\"\n [name]=\"formTemplate.name\"\n [formControl]=\"ngControl.control\"\n [binary]=\"true\"\n [disabled]=\"disabled\"\n [inputId]=\"formTemplate.name\"\n [value]=\"ngControl.control.value\"\n (onChange)=\"changeCheck($event)\">\n </p-checkbox>\n\n <label class=\"mb-0 ml-2 onshore-color-gray-5\"\n [for]=\"formTemplate.name\">\n {{formTemplate.description}}\n </label>\n </div>\n\n</onshore-form-item-container>\n" }]
1071
- }], ctorParameters: function () { return [{ type: i1$1.NgControl, decorators: [{
1072
- type: Self
1073
- }, {
1074
- type: Optional
1075
- }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formTemplate: [{
1076
- type: Input
1077
- }], actionButtonDisabled: [{
1078
- type: Input
1079
- }], actionButtonClick: [{
1080
- type: Output
1081
- }] } });
1082
-
1083
- class OnshoreFormAutocompleteItemComponent {
1084
- constructor(cdr, ngControl) {
1085
- this.cdr = cdr;
1086
- this.ngControl = ngControl;
1087
- this.multiple = false;
1088
- this.searchedData = [];
1089
- this.actionButtonDisabled = false;
1090
- this.onSearch = new EventEmitter();
1091
- this.onSelect = new EventEmitter();
1092
- this.onClear = new EventEmitter();
1093
- this.actionButtonClick = new EventEmitter();
1094
- this.disabled = false;
1095
- this.ngControl.valueAccessor = this;
1096
- }
1097
- selected(selectedItem) {
1098
- this.onSelect.emit(selectedItem.data);
1099
- this.cdr.markForCheck();
1100
- }
1101
- searchClear() {
1102
- this.searchedData = [];
1103
- this.ngControl.reset();
1104
- this.onClear.emit();
1105
- }
1106
- searchPrepare(term) {
1107
- if (term.query != '') {
1108
- this.search(term.query);
1109
- }
1110
- else {
1111
- this.searchedData = [];
1112
- this.ngControl.reset();
1113
- this.onClear.emit();
1114
- }
1115
- }
1116
- async search(searchTerm) {
1117
- this.onSearch.emit(searchTerm);
1118
- this.cdr.markForCheck();
1119
- }
1120
- writeValue(obj) {
1121
- if (obj) {
1122
- this.cdr.markForCheck();
1123
- }
1124
- }
1125
- registerOnChange(fn) {
1126
- if (this.ngControl.value) {
1127
- this.cdr.markForCheck();
1128
- }
1129
- }
1130
- registerOnTouched(fn) { }
1131
- setDisabledState(isDisabled) {
1132
- this.disabled = isDisabled;
1133
- }
1134
- ngOnInit() {
1135
- if (this.ngControl.control?.value == '' && this.formTemplate.default != undefined) {
1136
- this.ngControl.control?.setValue(this.formTemplate.default);
1137
- this.cdr.markForCheck();
1138
- }
1139
- }
1140
- ngOnDestroy() {
1141
- this.ngControl.control?.disable();
1142
- }
1143
- ngOnChanges(changes) {
1144
- this.cdr.markForCheck();
1145
- }
1146
- }
1147
- OnshoreFormAutocompleteItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormAutocompleteItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1148
- OnshoreFormAutocompleteItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormAutocompleteItemComponent, selector: "onshore-form-autocomplete-item", inputs: { formTemplate: "formTemplate", multiple: "multiple", searchedData: "searchedData", actionButtonDisabled: "actionButtonDisabled" }, outputs: { onSearch: "onSearch", onSelect: "onSelect", onClear: "onClear", actionButtonClick: "actionButtonClick" }, usesOnChanges: true, ngImport: i0, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\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]=\"searchedData\"\n (completeMethod)=\"searchPrepare($event)\"\n [disabled]=\"disabled\"\n [size]=\"30\"\n [minLength]=\"2\"\n [multiple]=\"multiple\"\n [delay]=\"1000\"\n [unique]=\"true\"\n field=\"firstLineLabel\"\n dataKey=\"data\"\n class=\"w-full\">\n <ng-template let-item pTemplate=\"item\">\n <div *ngIf=\"item.firstLineLabel\">\n <span class=\"mr-1\">\n <b>{{item.firstLineLabel}}</b><br>\n </span>\n </div>\n <div *ngIf=\"item.secondLineLabel\"><span>{{item.secondLineLabel}} </span></div>\n <div *ngIf=\"item.thirdLineLabel\"><span>{{item.thirdLineLabel}} </span></div>\n </ng-template>\n </p-autoComplete>\n</onshore-form-item-container>\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$4.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "itemSize", "suggestions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i3$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormAutocompleteItemComponent, decorators: [{
1150
- type: Component,
1151
- args: [{ selector: 'onshore-form-autocomplete-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\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]=\"searchedData\"\n (completeMethod)=\"searchPrepare($event)\"\n [disabled]=\"disabled\"\n [size]=\"30\"\n [minLength]=\"2\"\n [multiple]=\"multiple\"\n [delay]=\"1000\"\n [unique]=\"true\"\n field=\"firstLineLabel\"\n dataKey=\"data\"\n class=\"w-full\">\n <ng-template let-item pTemplate=\"item\">\n <div *ngIf=\"item.firstLineLabel\">\n <span class=\"mr-1\">\n <b>{{item.firstLineLabel}}</b><br>\n </span>\n </div>\n <div *ngIf=\"item.secondLineLabel\"><span>{{item.secondLineLabel}} </span></div>\n <div *ngIf=\"item.thirdLineLabel\"><span>{{item.thirdLineLabel}} </span></div>\n </ng-template>\n </p-autoComplete>\n</onshore-form-item-container>\n" }]
1152
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.NgControl, decorators: [{
1153
- type: Self
1154
- }, {
1155
- type: Optional
1156
- }] }]; }, propDecorators: { formTemplate: [{
1157
- type: Input
1158
- }], multiple: [{
1159
- type: Input
1160
- }], searchedData: [{
1161
- type: Input
1162
- }], actionButtonDisabled: [{
1163
- type: Input
1164
- }], onSearch: [{
1165
- type: Output
1166
- }], onSelect: [{
1167
- type: Output
1168
- }], onClear: [{
1169
- type: Output
1170
- }], actionButtonClick: [{
1171
- type: Output
1172
- }] } });
1173
-
1174
- class OnshoreFormDatetimeItemComponent {
1175
- constructor(ngControl, cdr) {
1176
- this.ngControl = ngControl;
1177
- this.cdr = cdr;
1178
- this.actionButtonDisabled = false;
1179
- this.actionButtonClick = new EventEmitter();
1180
- this.OnshoreFormTemplateType = OnshoreFormTemplateType;
1181
- this.disabled = false;
1182
- this.ngControl.valueAccessor = this;
1183
- }
1184
- // ControlValueAccessor interface
1185
- writeValue(obj) { }
1186
- registerOnChange(fn) { }
1187
- registerOnTouched(fn) { }
1188
- setDisabledState(isDisabled) {
1189
- this.disabled = isDisabled;
1190
- }
1191
- selectDate(date) {
1192
- console.log(date);
1193
- }
1194
- selectTime(time) {
1195
- console.log(time);
1196
- }
1197
- ngOnInit() {
1198
- if (this.ngControl.control?.value !== true && this.ngControl.control?.value !== false && this.formTemplate.default != undefined) {
1199
- this.ngControl.control?.setValue(this.formTemplate.default);
1200
- this.cdr.markForCheck();
1201
- }
1202
- }
1203
- ngOnChanges(changes) {
1204
- this.cdr.markForCheck();
1205
- }
1206
- ngOnDestroy() {
1207
- this.ngControl.control?.disable();
1208
- }
1209
- }
1210
- OnshoreFormDatetimeItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormDatetimeItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1211
- OnshoreFormDatetimeItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormDatetimeItemComponent, selector: "onshore-form-datetime-item", inputs: { formTemplate: "formTemplate", actionButtonDisabled: "actionButtonDisabled" }, outputs: { actionButtonClick: "actionButtonClick" }, usesOnChanges: true, ngImport: i0, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n\n <p-calendar class=\"w-full\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? 0\"\n [disabled]=\"disabled\"\n [formControl]=\"ngControl.control\"\n dateFormat=\"dd.mm.yy\"\n dataType=\"string\"\n hourFormat=\"24\"\n [timeOnly]=\"formTemplate.type == OnshoreFormTemplateType.time ? true : false\"\n [showTime]=\"formTemplate.type == OnshoreFormTemplateType.datetime ? true : false\"\n [defaultDate]=\"formTemplate.default\"\n (onSelect)=\"selectDate($event)\"\n appendTo=\"body\">\n </p-calendar>\n\n</onshore-form-item-container>\n", dependencies: [{ 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: i2$6.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1212
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormDatetimeItemComponent, decorators: [{
1213
- type: Component,
1214
- args: [{ selector: 'onshore-form-datetime-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n\n <p-calendar class=\"w-full\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? 0\"\n [disabled]=\"disabled\"\n [formControl]=\"ngControl.control\"\n dateFormat=\"dd.mm.yy\"\n dataType=\"string\"\n hourFormat=\"24\"\n [timeOnly]=\"formTemplate.type == OnshoreFormTemplateType.time ? true : false\"\n [showTime]=\"formTemplate.type == OnshoreFormTemplateType.datetime ? true : false\"\n [defaultDate]=\"formTemplate.default\"\n (onSelect)=\"selectDate($event)\"\n appendTo=\"body\">\n </p-calendar>\n\n</onshore-form-item-container>\n" }]
1215
- }], ctorParameters: function () { return [{ type: i1$1.NgControl, decorators: [{
1216
- type: Self
1217
- }, {
1218
- type: Optional
1219
- }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formTemplate: [{
1220
- type: Input
1221
- }], actionButtonDisabled: [{
1222
- type: Input
1223
- }], actionButtonClick: [{
1224
- type: Output
1225
- }] } });
1226
-
1227
- class OnshoreFormSortItemComponent {
1228
- constructor(ngControl, cdr) {
1229
- this.ngControl = ngControl;
1230
- this.cdr = cdr;
1231
- this.actionButtonDisabled = false;
1232
- this.actionButtonClick = new EventEmitter();
1233
- this.sortItems = [];
1234
- this.tempLockValue = [];
1235
- this.OnshoreFormTemplateType = OnshoreFormTemplateType;
1236
- this.disabled = false;
1237
- this.ngControl.valueAccessor = this;
1238
- }
1239
- sortItemsChanged(event) {
1240
- this.sortItems = event;
1241
- this.ngControl?.control?.setValue(event);
1242
- this.ngControl?.control?.markAsDirty();
1243
- this.cdr.markForCheck();
1244
- }
1245
- lockChanged(unlocked) {
1246
- if (unlocked && this.formTemplate.enabled) {
1247
- this.tempLockValue = this.ngControl?.control.value;
1248
- }
1249
- else {
1250
- this.ngControl?.control.setValue(this.tempLockValue);
1251
- this.sortItems = this.tempLockValue;
1252
- this.tempLockValue = null;
1253
- }
1254
- this.cdr.markForCheck();
1255
- }
1256
- // ControlValueAccessor interface
1257
- writeValue(obj) {
1258
- if (obj) {
1259
- this.cdr.markForCheck();
1260
- }
1261
- }
1262
- registerOnChange(fn) {
1263
- if (this.ngControl.value) {
1264
- this.cdr.markForCheck();
1265
- }
1266
- }
1267
- registerOnTouched(fn) { }
1268
- setDisabledState(isDisabled) {
1269
- this.disabled = isDisabled;
1270
- }
1271
- ngOnInit() {
1272
- this.ngControl.control?.valueChanges.pipe(debounceTime(100), distinctUntilChanged(), skip(1)).subscribe(newValue => {
1273
- this.ngControl?.control.setValue(newValue);
1274
- });
1275
- if (this.ngControl.control?.value == '' && this.formTemplate.default != undefined) {
1276
- this.ngControl.control?.setValue(this.formTemplate.default);
1277
- this.sortItems = this.formTemplate.default;
1278
- }
1279
- else {
1280
- this.sortItems = this.ngControl.control?.value;
1281
- }
1282
- this.cdr.markForCheck();
1283
- }
1284
- ngOnChanges(changes) {
1285
- this.cdr.markForCheck();
1286
- }
1287
- ngOnDestroy() {
1288
- this.ngControl.control?.disable();
1289
- }
1290
- }
1291
- OnshoreFormSortItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormSortItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1292
- OnshoreFormSortItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: OnshoreFormSortItemComponent, selector: "onshore-form-sort-item", inputs: { formTemplate: "formTemplate", actionButtonDisabled: "actionButtonDisabled" }, outputs: { actionButtonClick: "actionButtonClick" }, usesOnChanges: true, ngImport: i0, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\"\n (lockIsChanged)=\"lockChanged($event)\">\n\n <div *ngIf=\"formTemplate.type == OnshoreFormTemplateType.sort\"\n class=\"w-full\" [dragula]=\"ngControl.enabled\"\n [dragulaModel]=\"sortItems\"\n (dragulaModelChange)=\"sortItemsChanged($event)\">\n <div [class.cursor-move]=\"ngControl.enabled\"\n style=\"border-radius: 3px\"\n class=\"onshore-sort-item flex justify-content-between align-items-center onshore-border-gray-4 border-solid border-1 p-2 mb-2 onshore-background-color-white\" *ngFor=\"let item of sortItems\">\n <span [class.onshore-color-blocked]=\"!ngControl.enabled\">{{ item.label }}</span>\n <i [class.onshore-color-blocked]=\"!ngControl.enabled\" class=\"fa fa-arrows-v\"></i>\n </div>\n </div>\n\n</onshore-form-item-container>\n\n", dependencies: [{ 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: i3$5.DragulaDirective, selector: "[dragula]", inputs: ["dragula", "dragulaModel"], outputs: ["dragulaModelChange"] }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1293
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormSortItemComponent, decorators: [{
1294
- type: Component,
1295
- args: [{ selector: 'onshore-form-sort-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\"\n (lockIsChanged)=\"lockChanged($event)\">\n\n <div *ngIf=\"formTemplate.type == OnshoreFormTemplateType.sort\"\n class=\"w-full\" [dragula]=\"ngControl.enabled\"\n [dragulaModel]=\"sortItems\"\n (dragulaModelChange)=\"sortItemsChanged($event)\">\n <div [class.cursor-move]=\"ngControl.enabled\"\n style=\"border-radius: 3px\"\n class=\"onshore-sort-item flex justify-content-between align-items-center onshore-border-gray-4 border-solid border-1 p-2 mb-2 onshore-background-color-white\" *ngFor=\"let item of sortItems\">\n <span [class.onshore-color-blocked]=\"!ngControl.enabled\">{{ item.label }}</span>\n <i [class.onshore-color-blocked]=\"!ngControl.enabled\" class=\"fa fa-arrows-v\"></i>\n </div>\n </div>\n\n</onshore-form-item-container>\n\n" }]
1296
- }], ctorParameters: function () { return [{ type: i1$1.NgControl, decorators: [{
1297
- type: Self
1298
- }, {
1299
- type: Optional
1300
- }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formTemplate: [{
1301
- type: Input
1302
- }], actionButtonDisabled: [{
1303
- type: Input
1304
- }], actionButtonClick: [{
1305
- type: Output
1306
- }] } });
1307
-
1308
- class OnshoreFormsModule {
1309
- }
1310
- OnshoreFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1311
- OnshoreFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsModule, declarations: [OnshoreFormsComponent,
1312
- OnshoreImagePlaceholderComponent,
1313
- OnshoreFormInputItemComponent,
1314
- OnshoreFormSwitchItemComponent,
1315
- OnshoreFormValidationOutputComponent,
1316
- OnshoreFormImageItemComponent,
1317
- OnshoreFormDropdownItemComponent,
1318
- OnshoreFormColorpickerItemComponent,
1319
- OnshoreFormCheckboxItemComponent,
1320
- OnshoreFormAutocompleteItemComponent,
1321
- OnshoreFormItemContainer,
1322
- OnshoreFormDatetimeItemComponent,
1323
- OnshoreImageChooserComponent,
1324
- OnshoreFormSortItemComponent,
1325
- WebcamComponent], imports: [CommonModule,
1326
- FormsModule,
1327
- ReactiveFormsModule,
1328
- ButtonModule,
1329
- RippleModule,
1330
- AutoCompleteModule,
1331
- CheckboxModule,
1332
- ColorPickerModule,
1333
- DropdownModule,
1334
- MultiSelectModule,
1335
- TooltipModule,
1336
- InputNumberModule,
1337
- InputSwitchModule,
1338
- InputTextModule,
1339
- InputTextareaModule,
1340
- DialogModule,
1341
- SelectButtonModule,
1342
- ToggleButtonModule,
1343
- CalendarModule,
1344
- TranslateModule,
1345
- ImageCropperModule, i3$5.DragulaModule, WebcamModule], exports: [OnshoreFormsComponent,
1346
- OnshoreImagePlaceholderComponent,
1347
- OnshoreFormInputItemComponent,
1348
- OnshoreFormSwitchItemComponent,
1349
- OnshoreFormValidationOutputComponent,
1350
- OnshoreFormImageItemComponent,
1351
- OnshoreFormDropdownItemComponent,
1352
- OnshoreFormColorpickerItemComponent,
1353
- OnshoreFormCheckboxItemComponent,
1354
- OnshoreFormAutocompleteItemComponent,
1355
- OnshoreFormItemContainer,
1356
- OnshoreFormDatetimeItemComponent,
1357
- OnshoreImageChooserComponent,
1358
- OnshoreFormSortItemComponent,
1359
- WebcamComponent] });
1360
- OnshoreFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsModule, providers: [
1361
- OnshoreFormsService,
1362
- DialogService
1363
- ], imports: [CommonModule,
1364
- FormsModule,
1365
- ReactiveFormsModule,
1366
- ButtonModule,
1367
- RippleModule,
1368
- AutoCompleteModule,
1369
- CheckboxModule,
1370
- ColorPickerModule,
1371
- DropdownModule,
1372
- MultiSelectModule,
1373
- TooltipModule,
1374
- InputNumberModule,
1375
- InputSwitchModule,
1376
- InputTextModule,
1377
- InputTextareaModule,
1378
- DialogModule,
1379
- SelectButtonModule,
1380
- ToggleButtonModule,
1381
- CalendarModule,
1382
- TranslateModule,
1383
- ImageCropperModule,
1384
- DragulaModule.forRoot(),
1385
- WebcamModule] });
1386
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: OnshoreFormsModule, decorators: [{
1387
- type: NgModule,
1388
- args: [{
1389
- declarations: [
1390
- OnshoreFormsComponent,
1391
- OnshoreImagePlaceholderComponent,
1392
- OnshoreFormInputItemComponent,
1393
- OnshoreFormSwitchItemComponent,
1394
- OnshoreFormValidationOutputComponent,
1395
- OnshoreFormImageItemComponent,
1396
- OnshoreFormDropdownItemComponent,
1397
- OnshoreFormColorpickerItemComponent,
1398
- OnshoreFormCheckboxItemComponent,
1399
- OnshoreFormAutocompleteItemComponent,
1400
- OnshoreFormItemContainer,
1401
- OnshoreFormDatetimeItemComponent,
1402
- OnshoreImageChooserComponent,
1403
- OnshoreFormSortItemComponent,
1404
- WebcamComponent
1405
- ],
1406
- imports: [
1407
- CommonModule,
1408
- FormsModule,
1409
- ReactiveFormsModule,
1410
- ButtonModule,
1411
- RippleModule,
1412
- AutoCompleteModule,
1413
- CheckboxModule,
1414
- ColorPickerModule,
1415
- DropdownModule,
1416
- MultiSelectModule,
1417
- TooltipModule,
1418
- InputNumberModule,
1419
- InputSwitchModule,
1420
- InputTextModule,
1421
- InputTextareaModule,
1422
- DialogModule,
1423
- SelectButtonModule,
1424
- ToggleButtonModule,
1425
- CalendarModule,
1426
- TranslateModule,
1427
- ImageCropperModule,
1428
- DragulaModule.forRoot(),
1429
- WebcamModule
1430
- ],
1431
- exports: [
1432
- OnshoreFormsComponent,
1433
- OnshoreImagePlaceholderComponent,
1434
- OnshoreFormInputItemComponent,
1435
- OnshoreFormSwitchItemComponent,
1436
- OnshoreFormValidationOutputComponent,
1437
- OnshoreFormImageItemComponent,
1438
- OnshoreFormDropdownItemComponent,
1439
- OnshoreFormColorpickerItemComponent,
1440
- OnshoreFormCheckboxItemComponent,
1441
- OnshoreFormAutocompleteItemComponent,
1442
- OnshoreFormItemContainer,
1443
- OnshoreFormDatetimeItemComponent,
1444
- OnshoreImageChooserComponent,
1445
- OnshoreFormSortItemComponent,
1446
- WebcamComponent
1447
- ],
1448
- providers: [
1449
- OnshoreFormsService,
1450
- DialogService
1451
- ]
1452
- }]
1453
- }] });
1454
-
1455
- class OnshoreValidators {
1456
- }
1457
- OnshoreValidators.slug = (control) => {
1458
- return /^[A-Za-z0-9\._-]{2,20}$/.test(control.value) ? null : { slug: true };
1459
- };
1460
- OnshoreValidators.numeric = (control) => {
1461
- return /^[0-9]*$/.test(control.value) ? null : { numeric: true };
1462
- };
1463
- OnshoreValidators.email = (control) => {
1464
- return /^([\w-\.]+@([\w-]+\.)+[\w-]{2,10})?$/.test(control.value) ? null : { email: true };
1465
- };
1466
- OnshoreValidators.cleanComment = (control) => {
1467
- return /[A-Z]{5}\d{4}[A-Z]{1}/.test(control.value) ? null : { cleanComment: true };
1468
- };
1469
-
1470
- /*
1471
- * Public API Surface of onshore-forms
1472
- */
1473
-
1474
- /**
1475
- * Generated bundle index. Do not edit.
1476
- */
1477
-
1478
- export { OnshoreFormAutocompleteItemComponent, OnshoreFormCheckboxItemComponent, OnshoreFormColorpickerItemComponent, OnshoreFormDatetimeItemComponent, OnshoreFormDropdownItemComponent, OnshoreFormImageItemComponent, OnshoreFormInputItemComponent, OnshoreFormItemContainer, OnshoreFormSortItemComponent, OnshoreFormSwitchItemComponent, OnshoreFormTemplateLayout, OnshoreFormTemplateType, OnshoreFormValidationOutputComponent, OnshoreFormsComponent, OnshoreFormsModule, OnshoreFormsService, OnshoreImageChooserComponent, OnshoreImageError, OnshoreImagePlaceholderComponent, OnshoreValidators, WebcamComponent };
1479
- //# sourceMappingURL=onshore-forms.mjs.map