onshore-forms 1.0.20 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/onshore-forms.mjs +100 -89
- package/fesm2022/onshore-forms.mjs.map +1 -1
- package/package.json +10 -10
- package/types/onshore-forms.d.ts +528 -0
- package/index.d.ts +0 -5
- package/lib/components/form-autocomplete-item/form-autocomplete-item.component.d.ts +0 -35
- package/lib/components/form-checkbox-item/form-checkbox-item.component.d.ts +0 -24
- package/lib/components/form-colorpicker-item/form-colorpicker-item.component.d.ts +0 -27
- package/lib/components/form-datetime-item/form-datetime-item.component.d.ts +0 -25
- package/lib/components/form-dropdown-item/form-dropdown-item.component.d.ts +0 -39
- package/lib/components/form-image-item/form-image-item.component.d.ts +0 -38
- package/lib/components/form-input-item/form-input-item.component.d.ts +0 -36
- package/lib/components/form-item-container/form-item-container.component.d.ts +0 -27
- package/lib/components/form-scanner-item/form-scanner-item.component.d.ts +0 -36
- package/lib/components/form-sort-item/form-sort-item.component.d.ts +0 -28
- package/lib/components/form-switch-item/form-switch-item.component.d.ts +0 -24
- package/lib/components/form-validation-output/form-validation-output.component.d.ts +0 -15
- package/lib/components/image-chooser/image-chooser.component.d.ts +0 -24
- package/lib/components/image-placeholder/image-placeholder.component.d.ts +0 -15
- package/lib/components/inplace-input/inplace-input.component.d.ts +0 -11
- package/lib/components/webcam/webcam.component.d.ts +0 -24
- package/lib/enums/form.enums.d.ts +0 -34
- package/lib/models/form.models.d.ts +0 -76
- package/lib/onshore-forms.service.d.ts +0 -36
- package/lib/validators/form.validators.d.ts +0 -7
- package/public-api.d.ts +0 -19
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable,
|
|
3
|
-
import * as i1 from '@angular/forms';
|
|
2
|
+
import { Injectable, Input, ChangeDetectionStrategy, Component, EventEmitter, HostListener, ViewChild, Output, Self, Optional } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/forms';
|
|
4
4
|
import { FormGroup, FormArray, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import { Subject, debounceTime, distinctUntilChanged, skip } from 'rxjs';
|
|
6
6
|
import * as i2 from '@angular/common';
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
|
8
|
-
import * as
|
|
8
|
+
import * as i1 from '@ngx-translate/core';
|
|
9
9
|
import { TranslateModule } from '@ngx-translate/core';
|
|
10
10
|
import * as i2$1 from 'primeng/togglebutton';
|
|
11
11
|
import { ToggleButtonModule } from 'primeng/togglebutton';
|
|
12
|
-
import * as i3
|
|
12
|
+
import * as i3 from 'primeng/tooltip';
|
|
13
13
|
import { TooltipModule } from 'primeng/tooltip';
|
|
14
|
-
import * as
|
|
14
|
+
import * as i2$2 from 'primeng/button';
|
|
15
15
|
import { ButtonModule, Button } from 'primeng/button';
|
|
16
|
-
import * as i3$
|
|
16
|
+
import * as i3$1 from 'primeng/autocomplete';
|
|
17
17
|
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
18
18
|
import * as i6 from 'primeng/fluid';
|
|
19
19
|
import { FluidModule } from 'primeng/fluid';
|
|
20
|
-
import * as
|
|
20
|
+
import * as i4 from 'primeng/multiselect';
|
|
21
21
|
import { MultiSelect, MultiSelectModule } from 'primeng/multiselect';
|
|
22
22
|
import * as i5 from 'primeng/chip';
|
|
23
23
|
import { ChipModule } from 'primeng/chip';
|
|
24
|
-
import * as
|
|
25
|
-
import * as i2$
|
|
24
|
+
import * as i3$2 from 'primeng/api';
|
|
25
|
+
import * as i2$3 from 'primeng/checkbox';
|
|
26
26
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
27
|
-
import * as i2$
|
|
27
|
+
import * as i2$4 from 'primeng/inputtext';
|
|
28
28
|
import { InputTextModule, InputText } from 'primeng/inputtext';
|
|
29
|
-
import * as i3$
|
|
29
|
+
import * as i3$3 from 'primeng/colorpicker';
|
|
30
30
|
import { ColorPickerModule } from 'primeng/colorpicker';
|
|
31
|
-
import { updatePreset } from '@
|
|
32
|
-
import * as
|
|
31
|
+
import { updatePreset } from '@primeuix/themes';
|
|
32
|
+
import * as i3$4 from 'primeng/select';
|
|
33
33
|
import { SelectModule } from 'primeng/select';
|
|
34
|
-
import * as
|
|
34
|
+
import * as i5$1 from 'primeng/dialog';
|
|
35
35
|
import { DialogModule } from 'primeng/dialog';
|
|
36
36
|
import { ImageCropperComponent } from 'ngx-image-cropper';
|
|
37
|
-
import * as
|
|
37
|
+
import * as i4$1 from 'ngx-webcam';
|
|
38
38
|
import { WebcamModule } from 'ngx-webcam';
|
|
39
39
|
import * as i4$2 from 'primeng/textarea';
|
|
40
40
|
import { TextareaModule } from 'primeng/textarea';
|
|
41
|
-
import * as i6$
|
|
41
|
+
import * as i6$1 from 'primeng/inputnumber';
|
|
42
42
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
43
43
|
import * as i7 from 'primeng/inputgroup';
|
|
44
44
|
import { InputGroupModule } from 'primeng/inputgroup';
|
|
@@ -46,12 +46,12 @@ import * as i8 from 'primeng/inputgroupaddon';
|
|
|
46
46
|
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
47
47
|
import * as i3$5 from 'primeng/keyfilter';
|
|
48
48
|
import { KeyFilterModule } from 'primeng/keyfilter';
|
|
49
|
-
import * as i2$
|
|
50
|
-
import {
|
|
49
|
+
import * as i2$5 from 'primeng/toggleswitch';
|
|
50
|
+
import { ToggleSwitchModule } from 'primeng/toggleswitch';
|
|
51
51
|
import { DatePicker } from 'primeng/datepicker';
|
|
52
|
-
import * as
|
|
52
|
+
import * as i5$2 from 'primeng/inputotp';
|
|
53
53
|
import { InputOtpModule } from 'primeng/inputotp';
|
|
54
|
-
import * as
|
|
54
|
+
import * as i4$3 from 'primeng/popover';
|
|
55
55
|
import { PopoverModule } from 'primeng/popover';
|
|
56
56
|
|
|
57
57
|
var OnshoreFormTemplateType;
|
|
@@ -157,10 +157,11 @@ class OnshoreFormsService {
|
|
|
157
157
|
}
|
|
158
158
|
return template;
|
|
159
159
|
}
|
|
160
|
-
formControl(name,
|
|
161
|
-
return
|
|
160
|
+
formControl(name, formGroupOrArray = this._form) {
|
|
161
|
+
return formGroupOrArray?.get(name);
|
|
162
162
|
}
|
|
163
163
|
formArray(name) {
|
|
164
|
+
console.log("formArray", name, this._form?.get(name));
|
|
164
165
|
return this._form?.get(name);
|
|
165
166
|
}
|
|
166
167
|
formGroup(form, name) {
|
|
@@ -292,10 +293,10 @@ class OnshoreFormsService {
|
|
|
292
293
|
this.form?.updateValueAndValidity({ onlySelf: true, emitEvent: false });
|
|
293
294
|
}));
|
|
294
295
|
}
|
|
295
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
296
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
296
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
297
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormsService, providedIn: 'root' });
|
|
297
298
|
}
|
|
298
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormsService, decorators: [{
|
|
299
300
|
type: Injectable,
|
|
300
301
|
args: [{
|
|
301
302
|
providedIn: 'root'
|
|
@@ -343,13 +344,13 @@ class OnshoreFormValidationOutputComponent {
|
|
|
343
344
|
this.cdr = cdr;
|
|
344
345
|
this.translate = translate;
|
|
345
346
|
}
|
|
346
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
347
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
347
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormValidationOutputComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
348
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreFormValidationOutputComponent, isStandalone: true, selector: "onshore-form-validation-output", inputs: { validationErrors: "validationErrors", validationItems: "validationItems" }, usesOnChanges: true, ngImport: i0, template: "<small [style]=\"{color: 'var(--inputtext-invalid-placeholder-color)' }\"\n *ngIf=\"validationTranslation\"\n [innerHTML]=\"validationTranslation\">\n</small>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
348
349
|
}
|
|
349
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormValidationOutputComponent, decorators: [{
|
|
350
351
|
type: Component,
|
|
351
352
|
args: [{ selector: 'onshore-form-validation-output', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<small [style]=\"{color: 'var(--inputtext-invalid-placeholder-color)' }\"\n *ngIf=\"validationTranslation\"\n [innerHTML]=\"validationTranslation\">\n</small>\n" }]
|
|
352
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type:
|
|
353
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.TranslateService }], propDecorators: { validationErrors: [{
|
|
353
354
|
type: Input
|
|
354
355
|
}], validationItems: [{
|
|
355
356
|
type: Input
|
|
@@ -458,12 +459,12 @@ class OnshoreFormItemContainer {
|
|
|
458
459
|
constructor(cdr) {
|
|
459
460
|
this.cdr = cdr;
|
|
460
461
|
}
|
|
461
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
462
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
462
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormItemContainer, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
463
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreFormItemContainer, isStandalone: true, selector: "onshore-form-item-container", inputs: { formTemplate: "formTemplate", ngControl: "ngControl", actionButtonDisabled: "actionButtonDisabled" }, outputs: { actionButtonClick: "actionButtonClick", lockIsChanged: "lockIsChanged" }, host: { listeners: { "window:resize": "onWindowResize()" } }, 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\"\n [style]=\"{color: 'var(--inputtext-invalid-placeholder-color)' }\">*</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 text-color\"></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 onLabel=\"\"\n offLabel=\"\"\n class=\"mr-2\"\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 primary-color\"></i></div>\n </div>\n\n <div *ngIf=\"ngControl.control.touched || ngControl.control.dirty\" [style]=\"{'margin-left': layout == OnshoreFormTemplateLayout.horizontal ? (formLabel?.clientWidth + (formTemplate.locked ? 60 : 0)) + 'px' : (formTemplate.locked ? 60 : 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 ? 60 : 0)) + 'px' : (formTemplate.locked ? 60 : 0) + 'px', 'margin-right': formTemplate.tooltip && layout == OnshoreFormTemplateLayout.horizontal ? '16px' : '0px'}\">\n <small class=\"text-color\"><i class=\"fa fa-info-circle primary-color\"></i> {{formTemplate.description}}</small>\n </div>\n\n</div>\n", styles: ["::ng-deep .p-togglebutton-content{gap:0!important;width:20px;padding-left:5px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: OnshoreFormValidationOutputComponent, selector: "onshore-form-validation-output", inputs: ["validationErrors", "validationItems"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ToggleButtonModule }, { kind: "component", type: i2$1.ToggleButton, selector: "p-toggleButton, p-togglebutton, p-toggle-button", inputs: ["onLabel", "offLabel", "onIcon", "offIcon", "ariaLabel", "ariaLabelledBy", "styleClass", "inputId", "tabindex", "iconPos", "autofocus", "size", "allowEmpty", "fluid"], outputs: ["onChange"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$2.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
463
464
|
}
|
|
464
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
465
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormItemContainer, decorators: [{
|
|
465
466
|
type: Component,
|
|
466
|
-
args: [{ selector: 'onshore-form-item-container', imports: [CommonModule, OnshoreFormValidationOutputComponent, TranslateModule, ToggleButtonModule, TooltipModule, ButtonModule], 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\"\n [style]=\"{color: 'var(--inputtext-invalid-placeholder-color)' }\">*</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 text-color\"></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 [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 primary-color\"></i></div>\n </div>\n\n <div *ngIf=\"ngControl.control.touched || ngControl.control.dirty\" [style]=\"{'margin-left': layout == OnshoreFormTemplateLayout.horizontal ? (formLabel?.clientWidth + (formTemplate.locked ? 60 : 0)) + 'px' : (formTemplate.locked ? 60 : 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 ? 60 : 0)) + 'px' : (formTemplate.locked ? 60 : 0) + 'px', 'margin-right': formTemplate.tooltip && layout == OnshoreFormTemplateLayout.horizontal ? '16px' : '0px'}\">\n <small class=\"text-color\"><i class=\"fa fa-info-circle primary-color\"></i> {{formTemplate.description}}</small>\n </div>\n\n</div>\n" }]
|
|
467
|
+
args: [{ selector: 'onshore-form-item-container', imports: [CommonModule, OnshoreFormValidationOutputComponent, TranslateModule, ToggleButtonModule, TooltipModule, ButtonModule], 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\"\n [style]=\"{color: 'var(--inputtext-invalid-placeholder-color)' }\">*</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 text-color\"></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 onLabel=\"\"\n offLabel=\"\"\n class=\"mr-2\"\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 primary-color\"></i></div>\n </div>\n\n <div *ngIf=\"ngControl.control.touched || ngControl.control.dirty\" [style]=\"{'margin-left': layout == OnshoreFormTemplateLayout.horizontal ? (formLabel?.clientWidth + (formTemplate.locked ? 60 : 0)) + 'px' : (formTemplate.locked ? 60 : 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 ? 60 : 0)) + 'px' : (formTemplate.locked ? 60 : 0) + 'px', 'margin-right': formTemplate.tooltip && layout == OnshoreFormTemplateLayout.horizontal ? '16px' : '0px'}\">\n <small class=\"text-color\"><i class=\"fa fa-info-circle primary-color\"></i> {{formTemplate.description}}</small>\n </div>\n\n</div>\n", styles: ["::ng-deep .p-togglebutton-content{gap:0!important;width:20px;padding-left:5px}\n"] }]
|
|
467
468
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { formTemplate: [{
|
|
468
469
|
type: Input
|
|
469
470
|
}], ngControl: [{
|
|
@@ -479,7 +480,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
479
480
|
args: ['formContainer']
|
|
480
481
|
}], onWindowResize: [{
|
|
481
482
|
type: HostListener,
|
|
482
|
-
args: ['window:resize'
|
|
483
|
+
args: ['window:resize']
|
|
483
484
|
}] } });
|
|
484
485
|
|
|
485
486
|
class OnshoreFormAutocompleteItemComponent {
|
|
@@ -558,13 +559,13 @@ class OnshoreFormAutocompleteItemComponent {
|
|
|
558
559
|
this.ngControl = ngControl;
|
|
559
560
|
this.ngControl.valueAccessor = this;
|
|
560
561
|
}
|
|
561
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
562
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
562
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormAutocompleteItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
563
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreFormAutocompleteItemComponent, isStandalone: true, selector: "onshore-form-autocomplete-item", inputs: { formTemplate: "formTemplate", multiple: "multiple", showClear: "showClear", searchedData: "searchedData", actionButtonDisabled: "actionButtonDisabled", optionLabel: "optionLabel", optionValue: "optionValue", dataKey: "dataKey" }, outputs: { onSearch: "onSearch", onSelect: "onSelect", 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-fluid>\n <p-autoComplete [placeholder]=\"formTemplate.placeholder\"\n appendTo=\"body\"\n [formControl]=\"formControl\"\n [suggestions]=\"searchedData\"\n (completeMethod)=\"searchPrepare($event)\"\n [disabled]=\"disabled\"\n [showClear]=\"showClear\"\n [minLength]=\"2\"\n [multiple]=\"multiple\"\n [delay]=\"1000\"\n [unique]=\"true\"\n [dataKey]=\"dataKey\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n class=\"w-full\">\n <ng-template let-selectedItem pTemplate=\"selectedItem\">\n <p-chip [label]=\"findValue(selectedItem, optionLabel)\" [removable]=\"true\" (onRemove)=\"unselect(selectedItem)\"/>\n </ng-template>\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 </p-fluid>\n</onshore-form-item-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }, { kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i3$1.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo", "motionOptions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i3$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ChipModule }, { kind: "component", type: i5.Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "styleClass", "disabled", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FluidModule }, { kind: "component", type: i6.Fluid, selector: "p-fluid" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
563
564
|
}
|
|
564
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
565
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormAutocompleteItemComponent, decorators: [{
|
|
565
566
|
type: Component,
|
|
566
567
|
args: [{ selector: 'onshore-form-autocomplete-item', imports: [CommonModule, OnshoreFormItemContainer, AutoCompleteModule, ChipModule, FormsModule, ReactiveFormsModule, FluidModule, MultiSelect], changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n <p-fluid>\n <p-autoComplete [placeholder]=\"formTemplate.placeholder\"\n appendTo=\"body\"\n [formControl]=\"formControl\"\n [suggestions]=\"searchedData\"\n (completeMethod)=\"searchPrepare($event)\"\n [disabled]=\"disabled\"\n [showClear]=\"showClear\"\n [minLength]=\"2\"\n [multiple]=\"multiple\"\n [delay]=\"1000\"\n [unique]=\"true\"\n [dataKey]=\"dataKey\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n class=\"w-full\">\n <ng-template let-selectedItem pTemplate=\"selectedItem\">\n <p-chip [label]=\"findValue(selectedItem, optionLabel)\" [removable]=\"true\" (onRemove)=\"unselect(selectedItem)\"/>\n </ng-template>\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 </p-fluid>\n</onshore-form-item-container>\n" }]
|
|
567
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.NgControl, decorators: [{
|
|
568
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$1.NgControl, decorators: [{
|
|
568
569
|
type: Self
|
|
569
570
|
}, {
|
|
570
571
|
type: Optional
|
|
@@ -629,13 +630,13 @@ class OnshoreFormCheckboxItemComponent {
|
|
|
629
630
|
this.cdr = cdr;
|
|
630
631
|
this.ngControl.valueAccessor = this;
|
|
631
632
|
}
|
|
632
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
633
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
633
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormCheckboxItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
634
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreFormCheckboxItemComponent, isStandalone: true, 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]=\"formControl\"\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 text-color\"\n [for]=\"formTemplate.name\">\n {{formTemplate.hint}}\n </label>\n </div>\n\n</onshore-form-item-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i2$3.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
634
635
|
}
|
|
635
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormCheckboxItemComponent, decorators: [{
|
|
636
637
|
type: Component,
|
|
637
638
|
args: [{ selector: 'onshore-form-checkbox-item', imports: [CommonModule, OnshoreFormItemContainer, CheckboxModule, FormsModule, ReactiveFormsModule], 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]=\"formControl\"\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 text-color\"\n [for]=\"formTemplate.name\">\n {{formTemplate.hint}}\n </label>\n </div>\n\n</onshore-form-item-container>\n" }]
|
|
638
|
-
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
639
|
+
}], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
|
|
639
640
|
type: Self
|
|
640
641
|
}, {
|
|
641
642
|
type: Optional
|
|
@@ -706,13 +707,13 @@ class OnshoreFormColorpickerItemComponent {
|
|
|
706
707
|
this.ngControl.valueAccessor = this;
|
|
707
708
|
this.changeLayoutPreset();
|
|
708
709
|
}
|
|
709
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
710
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
710
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormColorpickerItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
711
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreFormColorpickerItemComponent, isStandalone: true, 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]=\"formControl\"\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 [autoZIndex]=\"true\"\n (onChange)=\"changeColor()\">\n </p-colorPicker>\n </div>\n</onshore-form-item-container>\n\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$4.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: ColorPickerModule }, { kind: "component", type: i3$3.ColorPicker, selector: "p-colorPicker, p-colorpicker, p-color-picker", inputs: ["styleClass", "showTransitionOptions", "hideTransitionOptions", "inline", "format", "tabindex", "inputId", "autoZIndex", "autofocus", "defaultColor", "appendTo", "overlayOptions", "motionOptions"], outputs: ["onChange", "onShow", "onHide"] }, { kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
711
712
|
}
|
|
712
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormColorpickerItemComponent, decorators: [{
|
|
713
714
|
type: Component,
|
|
714
|
-
args: [{ selector: 'onshore-form-colorpicker-item', imports: [CommonModule, OnshoreFormItemContainer, InputTextModule, ColorPickerModule, FormsModule, ReactiveFormsModule], 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]=\"formControl\"\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 [
|
|
715
|
-
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
715
|
+
args: [{ selector: 'onshore-form-colorpicker-item', imports: [CommonModule, OnshoreFormItemContainer, InputTextModule, ColorPickerModule, FormsModule, ReactiveFormsModule], 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]=\"formControl\"\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 [autoZIndex]=\"true\"\n (onChange)=\"changeColor()\">\n </p-colorPicker>\n </div>\n</onshore-form-item-container>\n\n" }]
|
|
716
|
+
}], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
|
|
716
717
|
type: Self
|
|
717
718
|
}, {
|
|
718
719
|
type: Optional
|
|
@@ -732,10 +733,10 @@ class OnshoreInplaceInputComponent {
|
|
|
732
733
|
constructor(cdr) {
|
|
733
734
|
this.cdr = cdr;
|
|
734
735
|
}
|
|
735
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
736
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
736
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreInplaceInputComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
737
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreInplaceInputComponent, isStandalone: true, selector: "onshore-inplace-input", outputs: { created: "created" }, ngImport: i0, template: "<div class=\"p-1\">\n <p-button *ngIf=\"!inputVisible\"\n [severity]=\"'secondary'\"\n icon=\"fa fa-plus\"\n [label]=\"'form.dropdownControl.addNewButton' | translate\"\n class=\"w-full\"\n (click)=\"inputVisible = true\">\n </p-button>\n <div *ngIf=\"inputVisible\" class=\"flex gap-2 align-items-center\">\n <input [(ngModel)]=\"inputText\"\n [placeholder]=\"'form.dropdownControl.addNewInputPlaceholder' | translate\"\n pInputText/>\n <p-button [icon]=\"'fa fa-plus'\" severity=\"secondary\" (click)=\"created.emit(inputText); inputVisible = false; inputText = ''\" />\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
737
738
|
}
|
|
738
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
739
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreInplaceInputComponent, decorators: [{
|
|
739
740
|
type: Component,
|
|
740
741
|
args: [{ selector: 'onshore-inplace-input', imports: [
|
|
741
742
|
CommonModule,
|
|
@@ -815,13 +816,13 @@ class OnshoreFormDropdownItemComponent {
|
|
|
815
816
|
this.ngControl.valueAccessor = this;
|
|
816
817
|
}
|
|
817
818
|
OnshoreFormTemplateType = OnshoreFormTemplateType;
|
|
818
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
819
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
819
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormDropdownItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
820
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreFormDropdownItemComponent, isStandalone: true, selector: "onshore-form-dropdown-item", inputs: { formTemplate: "formTemplate", multiple: "multiple", showClear: "showClear", group: "group", selectionLimit: "selectionLimit", minLength: "minLength", optionLabel: "optionLabel", optionValue: "optionValue", dataKey: "dataKey", optionGroupLabel: "optionGroupLabel", actionButtonDisabled: "actionButtonDisabled", createEnabled: "createEnabled", options: "options" }, outputs: { valueChange: "valueChange", actionButtonClick: "actionButtonClick", entryCreated: "entryCreated" }, usesOnChanges: true, ngImport: i0, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n\n <p-select *ngIf=\"!multiple\"\n class=\"w-full\"\n [options]=\"options\"\n [formControl]=\"formControl\"\n [name]=\"formTemplate?.name\"\n [placeholder]=\"formTemplate?.placeholder\"\n [disabled]=\"disabled\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [dataKey]=\"dataKey\"\n [optionGroupLabel]=\"optionGroupLabel\"\n [group]=\"group\"\n [showClear]=\"showClear && formTemplate?.placeholder\"\n (onClear)=\"clearSelection()\"\n optionDisabled=\"disabled\"\n appendTo=\"body\">\n <ng-template #footer>\n <div *ngIf=\"createEnabled\" class=\"flex justify-content-center\">\n <onshore-inplace-input (created)=\"entryCreated.emit($event)\">\n </onshore-inplace-input>\n </div>\n </ng-template>\n </p-select>\n\n <p-multiSelect *ngIf=\"multiple\"\n class=\"w-full\"\n [options]=\"options\"\n [formControl]=\"formControl\"\n [name]=\"formTemplate?.name\"\n [placeholder]=\"formTemplate?.placeholder\"\n [disabled]=\"disabled\"\n [showClear]=\"showClear\"\n [selectionLimit]=\"selectionLimit\"\n [minlength]=\"minLength\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [dataKey]=\"dataKey\"\n [optionGroupLabel]=\"optionGroupLabel\"\n [group]=\"group\"\n (onClear)=\"clearSelection()\"\n [selectedItemsLabel]=\"'form.dropdownControl.selectedItems' | translate\"\n optionDisabled=\"disabled\"\n appendTo=\"body\">\n <ng-template #footer>\n <div *ngIf=\"createEnabled\" class=\"flex justify-content-center\">\n <onshore-inplace-input (created)=\"entryCreated.emit($event)\">\n </onshore-inplace-input>\n </div>\n </ng-template>\n </p-multiSelect>\n</onshore-form-item-container>\n\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i3$4.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i4.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: OnshoreInplaceInputComponent, selector: "onshore-inplace-input", outputs: ["created"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
820
821
|
}
|
|
821
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
822
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormDropdownItemComponent, decorators: [{
|
|
822
823
|
type: Component,
|
|
823
824
|
args: [{ selector: 'onshore-form-dropdown-item', imports: [CommonModule, ButtonModule, OnshoreFormItemContainer, TranslateModule, SelectModule, MultiSelectModule, FormsModule, ReactiveFormsModule, DialogModule, OnshoreInplaceInputComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n\n <p-select *ngIf=\"!multiple\"\n class=\"w-full\"\n [options]=\"options\"\n [formControl]=\"formControl\"\n [name]=\"formTemplate?.name\"\n [placeholder]=\"formTemplate?.placeholder\"\n [disabled]=\"disabled\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [dataKey]=\"dataKey\"\n [optionGroupLabel]=\"optionGroupLabel\"\n [group]=\"group\"\n [showClear]=\"showClear && formTemplate?.placeholder\"\n (onClear)=\"clearSelection()\"\n optionDisabled=\"disabled\"\n appendTo=\"body\">\n <ng-template #footer>\n <div *ngIf=\"createEnabled\" class=\"flex justify-content-center\">\n <onshore-inplace-input (created)=\"entryCreated.emit($event)\">\n </onshore-inplace-input>\n </div>\n </ng-template>\n </p-select>\n\n <p-multiSelect *ngIf=\"multiple\"\n class=\"w-full\"\n [options]=\"options\"\n [formControl]=\"formControl\"\n [name]=\"formTemplate?.name\"\n [placeholder]=\"formTemplate?.placeholder\"\n [disabled]=\"disabled\"\n [showClear]=\"showClear\"\n [selectionLimit]=\"selectionLimit\"\n [minlength]=\"minLength\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [dataKey]=\"dataKey\"\n [optionGroupLabel]=\"optionGroupLabel\"\n [group]=\"group\"\n (onClear)=\"clearSelection()\"\n [selectedItemsLabel]=\"'form.dropdownControl.selectedItems' | translate\"\n optionDisabled=\"disabled\"\n appendTo=\"body\">\n <ng-template #footer>\n <div *ngIf=\"createEnabled\" class=\"flex justify-content-center\">\n <onshore-inplace-input (created)=\"entryCreated.emit($event)\">\n </onshore-inplace-input>\n </div>\n </ng-template>\n </p-multiSelect>\n</onshore-form-item-container>\n\n" }]
|
|
824
|
-
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
825
|
+
}], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
|
|
825
826
|
type: Self
|
|
826
827
|
}, {
|
|
827
828
|
type: Optional
|
|
@@ -876,10 +877,10 @@ class OnshoreImagePlaceholderComponent {
|
|
|
876
877
|
this.showLoader = false;
|
|
877
878
|
}
|
|
878
879
|
constructor() { }
|
|
879
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
880
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
880
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreImagePlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
881
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreImagePlaceholderComponent, isStandalone: true, 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.p-2]=\"placeholderIcon\">\n <i *ngIf=\"placeholderIcon\" [class]=\"'text-color 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", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
881
882
|
}
|
|
882
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreImagePlaceholderComponent, decorators: [{
|
|
883
884
|
type: Component,
|
|
884
885
|
args: [{ selector: 'onshore-image-placeholder', imports: [CommonModule], 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.p-2]=\"placeholderIcon\">\n <i *ngIf=\"placeholderIcon\" [class]=\"'text-color 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" }]
|
|
885
886
|
}], ctorParameters: () => [], propDecorators: { placeholderIcon: [{
|
|
@@ -969,10 +970,10 @@ class OnshoreImageChooserComponent {
|
|
|
969
970
|
constructor(cdr) {
|
|
970
971
|
this.cdr = cdr;
|
|
971
972
|
}
|
|
972
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
973
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
973
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreImageChooserComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
974
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreImageChooserComponent, isStandalone: true, 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 px-4 pb-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 text-color\"></i>\n <small class=\"text-color mb-4\">{{'form.imageControl.dropImageLabel' | translate}}</small>\n\n <p-button [severity]=\"'primary'\"\n [label]=\"'form.imageControl.imageChooserFileButton' | translate\">\n </p-button>\n\n <input\n (change)=\"fileChange($event)\"\n *ngIf=\"!image\"\n accept=\"image/png, image/jpeg, image/webp\"\n class=\"absolute w-full h-full bottom-0 cursor-pointer\"\n style=\"opacity: 0\"\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\"\n [style]=\"{color: 'var(--inputtext-invalid-placeholder-color)' }\">\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 gap-2\">\n <p-button [severity]=\"'secondary'\"\n [raised]=\"true\"\n [rounded]=\"true\"\n icon=\"fa fa-times\"\n [label]=\"'form.imageControl.imageChooserCancelButton' | translate\"\n (click)=\"clear(); canceled.emit(true)\">\n </p-button>\n\n <p-button [severity]=\"'primary'\"\n [raised]=\"true\"\n [rounded]=\"true\"\n [label]=\"'form.imageControl.imageChooserSelectButton' | translate\"\n icon=\"fa fa-check\"\n [disabled]=\"!image\"\n (click)=\"imageCroppedReady()\">\n </p-button>\n </div>\n</p-footer>\n\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2$2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3$2.Footer, selector: "p-footer" }, { kind: "ngmodule", type: InputTextModule }, { kind: "component", type: ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "options", "cropperFrameAriaLabel", "output", "format", "autoCrop", "cropper", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "checkImageType", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange", "cropperChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
974
975
|
}
|
|
975
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
976
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreImageChooserComponent, decorators: [{
|
|
976
977
|
type: Component,
|
|
977
978
|
args: [{ selector: 'onshore-image-chooser', imports: [CommonModule, TranslateModule, ButtonModule, InputTextModule, ImageCropperComponent, FormsModule, ReactiveFormsModule], 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 px-4 pb-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 text-color\"></i>\n <small class=\"text-color mb-4\">{{'form.imageControl.dropImageLabel' | translate}}</small>\n\n <p-button [severity]=\"'primary'\"\n [label]=\"'form.imageControl.imageChooserFileButton' | translate\">\n </p-button>\n\n <input\n (change)=\"fileChange($event)\"\n *ngIf=\"!image\"\n accept=\"image/png, image/jpeg, image/webp\"\n class=\"absolute w-full h-full bottom-0 cursor-pointer\"\n style=\"opacity: 0\"\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\"\n [style]=\"{color: 'var(--inputtext-invalid-placeholder-color)' }\">\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 gap-2\">\n <p-button [severity]=\"'secondary'\"\n [raised]=\"true\"\n [rounded]=\"true\"\n icon=\"fa fa-times\"\n [label]=\"'form.imageControl.imageChooserCancelButton' | translate\"\n (click)=\"clear(); canceled.emit(true)\">\n </p-button>\n\n <p-button [severity]=\"'primary'\"\n [raised]=\"true\"\n [rounded]=\"true\"\n [label]=\"'form.imageControl.imageChooserSelectButton' | translate\"\n icon=\"fa fa-check\"\n [disabled]=\"!image\"\n (click)=\"imageCroppedReady()\">\n </p-button>\n </div>\n</p-footer>\n\n" }]
|
|
978
979
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { imageSettings: [{
|
|
@@ -1022,10 +1023,10 @@ class WebcamComponent {
|
|
|
1022
1023
|
constructor(cdr) {
|
|
1023
1024
|
this.cdr = cdr;
|
|
1024
1025
|
}
|
|
1025
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1026
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1026
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: WebcamComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1027
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: WebcamComponent, isStandalone: true, 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 gap-2 mt-2\">\n\n <p-button [severity]=\"'secondary'\"\n [raised]=\"true\"\n [rounded]=\"true\"\n icon=\"fa fa-times\"\n [label]=\"'global.cancel' | translate\"\n (click)=\"canceled.emit(true)\">\n </p-button>\n\n <p-button *ngIf=\"!image || image == ''\"\n [severity]=\"'primary'\"\n [raised]=\"true\"\n [rounded]=\"true\"\n [label]=\"'form.imageControl.webcamSmileButton' | translate\"\n icon=\"fa fa-laugh-wink\"\n (click)=\"triggerSnapshot()\">\n </p-button>\n\n <p-button *ngIf=\"image && image != ''\"\n [severity]=\"'primary'\"\n [raised]=\"true\"\n [rounded]=\"true\"\n [label]=\"'global.use' | translate\"\n icon=\"fa fa-check\"\n (click)=\"imageCroppedReady()\">\n </p-button>\n </div>\n</p-footer>\n\n\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2$2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3$2.Footer, selector: "p-footer" }, { kind: "component", type: ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "options", "cropperFrameAriaLabel", "output", "format", "autoCrop", "cropper", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "checkImageType", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange", "cropperChange"] }, { kind: "ngmodule", type: WebcamModule }, { kind: "component", type: i4$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 });
|
|
1027
1028
|
}
|
|
1028
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1029
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: WebcamComponent, decorators: [{
|
|
1029
1030
|
type: Component,
|
|
1030
1031
|
args: [{ selector: 'onshore-webcam', imports: [CommonModule, TranslateModule, ButtonModule, ImageCropperComponent, WebcamModule], 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 gap-2 mt-2\">\n\n <p-button [severity]=\"'secondary'\"\n [raised]=\"true\"\n [rounded]=\"true\"\n icon=\"fa fa-times\"\n [label]=\"'global.cancel' | translate\"\n (click)=\"canceled.emit(true)\">\n </p-button>\n\n <p-button *ngIf=\"!image || image == ''\"\n [severity]=\"'primary'\"\n [raised]=\"true\"\n [rounded]=\"true\"\n [label]=\"'form.imageControl.webcamSmileButton' | translate\"\n icon=\"fa fa-laugh-wink\"\n (click)=\"triggerSnapshot()\">\n </p-button>\n\n <p-button *ngIf=\"image && image != ''\"\n [severity]=\"'primary'\"\n [raised]=\"true\"\n [rounded]=\"true\"\n [label]=\"'global.use' | translate\"\n icon=\"fa fa-check\"\n (click)=\"imageCroppedReady()\">\n </p-button>\n </div>\n</p-footer>\n\n\n" }]
|
|
1031
1032
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { imageSettings: [{
|
|
@@ -1166,13 +1167,13 @@ class OnshoreFormImageItemComponent {
|
|
|
1166
1167
|
this.ngControl = ngControl;
|
|
1167
1168
|
this.ngControl.valueAccessor = this;
|
|
1168
1169
|
}
|
|
1169
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1170
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1170
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormImageItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1171
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreFormImageItemComponent, isStandalone: true, 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 gap-2\" [class.flex-column]=\"formTemplate.layout === OnshoreFormTemplateLayout.vertical\">\n\n <div class=\"border-solid border-1 border-300 border-round-md 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>\n <p-fluid class=\"flex flex-column\">\n <p-button *ngIf=\"imageSettings.imageSelectionEnabled\"\n [severity]=\"'secondary'\"\n icon=\"fa fa-image\"\n [label]=\"'form.imageControl.uploadImageButton' | translate\"\n class=\"mb-2 w-full\"\n [disabled]=\"disabled\"\n (click)=\"imageChooserDialogVisible = true; cdr.detectChanges()\">\n </p-button>\n\n <p-button *ngIf=\"imageSettings.webcamSelectionEnabled\"\n [severity]=\"'secondary'\"\n icon=\"fa fa-camera\"\n [label]=\"'form.imageControl.webcamImageButton' | translate\"\n class=\"mb-2 w-full\"\n [disabled]=\"disabled\"\n (click)=\"webcamDialogVisible = true\">\n </p-button>\n\n <p-button *ngIf=\"imageSettings.mediaSelectionEnabled\"\n [severity]=\"'secondary'\"\n icon=\"fa fa-photo-video\"\n [label]=\"'form.imageControl.mediaImageButton' | translate\"\n class=\"mb-2 w-full\"\n [disabled]=\"disabled\"\n (click)=\"selectFromMedia.emit()\">\n </p-button>\n\n <p-button *ngIf=\"imageSettings.deleteEnabled\"\n [severity]=\"'secondary'\"\n icon=\"fa fa-eraser\"\n [label]=\"'form.imageControl.removeImageButton' | translate\"\n (click)=\"removeImage()\"\n class=\"w-full\"\n [disabled]=\"!image || disabled\">\n </p-button>\n </p-fluid>\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", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }, { kind: "ngmodule", type: FluidModule }, { kind: "component", type: i6.Fluid, selector: "p-fluid" }, { kind: "component", type: OnshoreImagePlaceholderComponent, selector: "onshore-image-placeholder", inputs: ["placeholderIcon", "placeholderImage", "image", "imageStyle", "placeholderStyle", "showLoader"] }, { 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: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2$2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i5$1.Dialog, selector: "p-dialog", inputs: ["hostName", "header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "maskMotionOptions", "motionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1171
1172
|
}
|
|
1172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormImageItemComponent, decorators: [{
|
|
1173
1174
|
type: Component,
|
|
1174
1175
|
args: [{ selector: 'onshore-form-image-item', imports: [CommonModule, OnshoreFormItemContainer, FluidModule, OnshoreImagePlaceholderComponent, OnshoreImageChooserComponent, WebcamComponent, TranslateModule, ButtonModule, DialogModule, FormsModule, ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\" [ngControl]=\"ngControl\">\n <div class=\"w-full flex align-items-center gap-2\" [class.flex-column]=\"formTemplate.layout === OnshoreFormTemplateLayout.vertical\">\n\n <div class=\"border-solid border-1 border-300 border-round-md 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>\n <p-fluid class=\"flex flex-column\">\n <p-button *ngIf=\"imageSettings.imageSelectionEnabled\"\n [severity]=\"'secondary'\"\n icon=\"fa fa-image\"\n [label]=\"'form.imageControl.uploadImageButton' | translate\"\n class=\"mb-2 w-full\"\n [disabled]=\"disabled\"\n (click)=\"imageChooserDialogVisible = true; cdr.detectChanges()\">\n </p-button>\n\n <p-button *ngIf=\"imageSettings.webcamSelectionEnabled\"\n [severity]=\"'secondary'\"\n icon=\"fa fa-camera\"\n [label]=\"'form.imageControl.webcamImageButton' | translate\"\n class=\"mb-2 w-full\"\n [disabled]=\"disabled\"\n (click)=\"webcamDialogVisible = true\">\n </p-button>\n\n <p-button *ngIf=\"imageSettings.mediaSelectionEnabled\"\n [severity]=\"'secondary'\"\n icon=\"fa fa-photo-video\"\n [label]=\"'form.imageControl.mediaImageButton' | translate\"\n class=\"mb-2 w-full\"\n [disabled]=\"disabled\"\n (click)=\"selectFromMedia.emit()\">\n </p-button>\n\n <p-button *ngIf=\"imageSettings.deleteEnabled\"\n [severity]=\"'secondary'\"\n icon=\"fa fa-eraser\"\n [label]=\"'form.imageControl.removeImageButton' | translate\"\n (click)=\"removeImage()\"\n class=\"w-full\"\n [disabled]=\"!image || disabled\">\n </p-button>\n </p-fluid>\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" }]
|
|
1175
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.NgControl, decorators: [{
|
|
1176
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$1.NgControl, decorators: [{
|
|
1176
1177
|
type: Self
|
|
1177
1178
|
}, {
|
|
1178
1179
|
type: Optional
|
|
@@ -1217,6 +1218,7 @@ class OnshoreFormInputItemComponent {
|
|
|
1217
1218
|
registerOnChange(fn) { }
|
|
1218
1219
|
registerOnTouched(fn) { }
|
|
1219
1220
|
setDisabledState(isDisabled) {
|
|
1221
|
+
console.log("isDisabled", isDisabled);
|
|
1220
1222
|
this.disabled = isDisabled;
|
|
1221
1223
|
}
|
|
1222
1224
|
ngOnInit() {
|
|
@@ -1245,13 +1247,13 @@ class OnshoreFormInputItemComponent {
|
|
|
1245
1247
|
this.cdr = cdr;
|
|
1246
1248
|
this.ngControl.valueAccessor = this;
|
|
1247
1249
|
}
|
|
1248
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1249
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1250
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormInputItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1251
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreFormInputItemComponent, isStandalone: true, selector: "onshore-form-input-item", inputs: { formTemplate: "formTemplate", step: "step", min: "min", max: "max", minLength: "minLength", maxLength: "maxLength", currency: "currency", mode: "mode", useGrouping: "useGrouping", actionButtonDisabled: "actionButtonDisabled", keyFilter: "keyFilter" }, 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 <p-fluid>\n <p-inputgroup>\n\n <textarea *ngIf=\"formTemplate.type == OnshoreFormTemplateType.textarea\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n [rows]=\"3\"\n [cols]=\"30\"\n pTextarea\n [autoResize]=\"true\"\n [formControl]=\"formControl\"\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 [type]=\"formTemplate.type\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n pInputText\n [formControl]=\"formControl\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [minLength]=\"minLength\"\n [maxLength]=\"maxLength\"\n [pKeyFilter]=\"keyFilter\"/>\n\n <input *ngIf=\"formTemplate.type == OnshoreFormTemplateType.password\"\n [type]=\"passwordVisible ? 'text' : formTemplate.type\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n pInputText\n [formControl]=\"formControl\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [minLength]=\"minLength\"\n [maxLength]=\"maxLength\"/>\n\n <p-inputgroup-addon *ngIf=\"formTemplate.inputAddon\">\n <i [class]=\"formTemplate.inputAddon\"></i>\n </p-inputgroup-addon>\n\n <p-inputgroup-addon *ngIf=\"formTemplate.type == OnshoreFormTemplateType.password\" class=\"cursor-pointer\" (click)=\"passwordVisible = !passwordVisible\">\n <i [class]=\"passwordVisible ? 'fa fa-eye' : 'fa fa-eye-slash'\"></i>\n </p-inputgroup-addon>\n\n </p-inputgroup>\n\n <p-inputNumber *ngIf=\"formTemplate.type == OnshoreFormTemplateType.number\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n [formControl]=\"formControl\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [step]=\"step ?? 1\"\n [min]=\"min\"\n [max]=\"max\"\n [showButtons]=\"true\"\n [mode]=\"mode\"\n [useGrouping]=\"useGrouping\"\n [currency]=\"currency\"\n style=\"min-width: 120px\"\n [buttonLayout]=\"formTemplate.inputNumberVertical ? 'vertical' : 'horizontal'\"\n spinnerMode=\"horizontal\"\n (onInput)=\"onNumberInput($event)\">\n <ng-template #incrementbuttonicon>\n <span class=\"fa fa-plus\"></span>\n </ng-template>\n <ng-template #decrementbuttonicon>\n <span class=\"fa fa-minus\"></span>\n </ng-template>\n </p-inputNumber>\n </p-fluid>\n\n</onshore-form-item-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: KeyFilterModule }, { kind: "directive", type: i3$5.KeyFilter, selector: "[pKeyFilter]", inputs: ["pValidateOnly", "pKeyFilter"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i4$2.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$4.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i6$1.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "component", type: i7.InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "component", type: i8.InputGroupAddon, selector: "p-inputgroup-addon, p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: FluidModule }, { kind: "component", type: i6.Fluid, selector: "p-fluid" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1250
1252
|
}
|
|
1251
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1253
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormInputItemComponent, decorators: [{
|
|
1252
1254
|
type: Component,
|
|
1253
1255
|
args: [{ selector: 'onshore-form-input-item', imports: [CommonModule, OnshoreFormItemContainer, TranslateModule, KeyFilterModule, TextareaModule, InputTextModule, InputNumberModule, FormsModule, ReactiveFormsModule, InputGroupModule, InputGroupAddonModule, ButtonModule, FluidModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n <p-fluid>\n <p-inputgroup>\n\n <textarea *ngIf=\"formTemplate.type == OnshoreFormTemplateType.textarea\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n [rows]=\"3\"\n [cols]=\"30\"\n pTextarea\n [autoResize]=\"true\"\n [formControl]=\"formControl\"\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 [type]=\"formTemplate.type\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n pInputText\n [formControl]=\"formControl\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [minLength]=\"minLength\"\n [maxLength]=\"maxLength\"\n [pKeyFilter]=\"keyFilter\"/>\n\n <input *ngIf=\"formTemplate.type == OnshoreFormTemplateType.password\"\n [type]=\"passwordVisible ? 'text' : formTemplate.type\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n pInputText\n [formControl]=\"formControl\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [minLength]=\"minLength\"\n [maxLength]=\"maxLength\"/>\n\n <p-inputgroup-addon *ngIf=\"formTemplate.inputAddon\">\n <i [class]=\"formTemplate.inputAddon\"></i>\n </p-inputgroup-addon>\n\n <p-inputgroup-addon *ngIf=\"formTemplate.type == OnshoreFormTemplateType.password\" class=\"cursor-pointer\" (click)=\"passwordVisible = !passwordVisible\">\n <i [class]=\"passwordVisible ? 'fa fa-eye' : 'fa fa-eye-slash'\"></i>\n </p-inputgroup-addon>\n\n </p-inputgroup>\n\n <p-inputNumber *ngIf=\"formTemplate.type == OnshoreFormTemplateType.number\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n [formControl]=\"formControl\"\n [autocomplete]=\"'prevent-template-' + formTemplate.name\"\n [step]=\"step ?? 1\"\n [min]=\"min\"\n [max]=\"max\"\n [showButtons]=\"true\"\n [mode]=\"mode\"\n [useGrouping]=\"useGrouping\"\n [currency]=\"currency\"\n style=\"min-width: 120px\"\n [buttonLayout]=\"formTemplate.inputNumberVertical ? 'vertical' : 'horizontal'\"\n spinnerMode=\"horizontal\"\n (onInput)=\"onNumberInput($event)\">\n <ng-template #incrementbuttonicon>\n <span class=\"fa fa-plus\"></span>\n </ng-template>\n <ng-template #decrementbuttonicon>\n <span class=\"fa fa-minus\"></span>\n </ng-template>\n </p-inputNumber>\n </p-fluid>\n\n</onshore-form-item-container>\n" }]
|
|
1254
|
-
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
1256
|
+
}], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
|
|
1255
1257
|
type: Self
|
|
1256
1258
|
}, {
|
|
1257
1259
|
type: Optional
|
|
@@ -1319,13 +1321,13 @@ class OnshoreFormSwitchItemComponent {
|
|
|
1319
1321
|
this.cdr = cdr;
|
|
1320
1322
|
this.ngControl.valueAccessor = this;
|
|
1321
1323
|
}
|
|
1322
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1323
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1324
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormSwitchItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1325
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreFormSwitchItemComponent, isStandalone: true, 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-toggleswitch [name]=\"formTemplate.name\"\n [formControl]=\"formControl\"\n [disabled]=\"disabled\"\n [inputId]=\"formTemplate.name\">\n </p-toggleswitch>\n </div>\n\n</onshore-form-item-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ToggleSwitchModule }, { kind: "component", type: i2$5.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1324
1326
|
}
|
|
1325
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormSwitchItemComponent, decorators: [{
|
|
1326
1328
|
type: Component,
|
|
1327
|
-
args: [{ selector: 'onshore-form-switch-item', imports: [CommonModule, OnshoreFormItemContainer, TranslateModule,
|
|
1328
|
-
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
1329
|
+
args: [{ selector: 'onshore-form-switch-item', imports: [CommonModule, OnshoreFormItemContainer, TranslateModule, ToggleSwitchModule, FormsModule, ReactiveFormsModule], 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-toggleswitch [name]=\"formTemplate.name\"\n [formControl]=\"formControl\"\n [disabled]=\"disabled\"\n [inputId]=\"formTemplate.name\">\n </p-toggleswitch>\n </div>\n\n</onshore-form-item-container>\n" }]
|
|
1330
|
+
}], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
|
|
1329
1331
|
type: Self
|
|
1330
1332
|
}, {
|
|
1331
1333
|
type: Optional
|
|
@@ -1345,6 +1347,9 @@ class OnshoreFormDatetimeItemComponent {
|
|
|
1345
1347
|
formTemplate;
|
|
1346
1348
|
actionButtonDisabled = false;
|
|
1347
1349
|
actionButtonClick = new EventEmitter();
|
|
1350
|
+
dateFormat = 'dd.mm.yy';
|
|
1351
|
+
hourFormat = '24';
|
|
1352
|
+
dataType = 'date';
|
|
1348
1353
|
OnshoreFormTemplateType = OnshoreFormTemplateType;
|
|
1349
1354
|
disabled = false;
|
|
1350
1355
|
// ControlValueAccessor interface
|
|
@@ -1374,13 +1379,13 @@ class OnshoreFormDatetimeItemComponent {
|
|
|
1374
1379
|
this.cdr = cdr;
|
|
1375
1380
|
this.ngControl.valueAccessor = this;
|
|
1376
1381
|
}
|
|
1377
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1378
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1382
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormDatetimeItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1383
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreFormDatetimeItemComponent, isStandalone: true, selector: "onshore-form-datetime-item", inputs: { formTemplate: "formTemplate", actionButtonDisabled: "actionButtonDisabled", dateFormat: "dateFormat", hourFormat: "hourFormat", dataType: "dataType" }, 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 <p-fluid>\n <p-datePicker class=\"w-full\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n [formControl]=\"formControl\"\n [dateFormat]=\"dateFormat\"\n [dataType]=\"dataType\"\n [hourFormat]=\"hourFormat\"\n [timeOnly]=\"formTemplate.type == OnshoreFormTemplateType.time\"\n [showTime]=\"formTemplate.type == OnshoreFormTemplateType.datetime\"\n [defaultDate]=\"formTemplate.default\"\n appendTo=\"body\">\n </p-datePicker>\n </p-fluid>\n</onshore-form-item-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }, { kind: "component", type: DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FluidModule }, { kind: "component", type: i6.Fluid, selector: "p-fluid" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1379
1384
|
}
|
|
1380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormDatetimeItemComponent, decorators: [{
|
|
1381
1386
|
type: Component,
|
|
1382
|
-
args: [{ selector: 'onshore-form-datetime-item', imports: [CommonModule, OnshoreFormItemContainer, DatePicker, FormsModule, ReactiveFormsModule, FluidModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n <p-fluid>\n <p-datePicker class=\"w-full\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n [formControl]=\"formControl\"\n dateFormat=\"
|
|
1383
|
-
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
1387
|
+
args: [{ selector: 'onshore-form-datetime-item', imports: [CommonModule, OnshoreFormItemContainer, DatePicker, FormsModule, ReactiveFormsModule, FluidModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n <p-fluid>\n <p-datePicker class=\"w-full\"\n [name]=\"formTemplate.name\"\n [placeholder]=\"formTemplate.placeholder ?? ''\"\n [disabled]=\"disabled\"\n [formControl]=\"formControl\"\n [dateFormat]=\"dateFormat\"\n [dataType]=\"dataType\"\n [hourFormat]=\"hourFormat\"\n [timeOnly]=\"formTemplate.type == OnshoreFormTemplateType.time\"\n [showTime]=\"formTemplate.type == OnshoreFormTemplateType.datetime\"\n [defaultDate]=\"formTemplate.default\"\n appendTo=\"body\">\n </p-datePicker>\n </p-fluid>\n</onshore-form-item-container>\n" }]
|
|
1388
|
+
}], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
|
|
1384
1389
|
type: Self
|
|
1385
1390
|
}, {
|
|
1386
1391
|
type: Optional
|
|
@@ -1390,6 +1395,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
1390
1395
|
type: Input
|
|
1391
1396
|
}], actionButtonClick: [{
|
|
1392
1397
|
type: Output
|
|
1398
|
+
}], dateFormat: [{
|
|
1399
|
+
type: Input
|
|
1400
|
+
}], hourFormat: [{
|
|
1401
|
+
type: Input
|
|
1402
|
+
}], dataType: [{
|
|
1403
|
+
type: Input
|
|
1393
1404
|
}] } });
|
|
1394
1405
|
|
|
1395
1406
|
class OnshoreFormSortItemComponent {
|
|
@@ -1458,13 +1469,13 @@ class OnshoreFormSortItemComponent {
|
|
|
1458
1469
|
this.cdr = cdr;
|
|
1459
1470
|
this.ngControl.valueAccessor = this;
|
|
1460
1471
|
}
|
|
1461
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1462
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1472
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormSortItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1473
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreFormSortItemComponent, isStandalone: true, 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", styles: ["onshore-form-sort-item .onshore-sort-item{font-family:Lato-Regular!important}.gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)\";filter:alpha(opacity=80);pointer-events:none;font-family:Lato-Regular!important}.gu-hide{left:-9999px!important}.gu-unselectable{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.gu-transit{opacity:.2;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)\";filter:alpha(opacity=20)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1463
1474
|
}
|
|
1464
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormSortItemComponent, decorators: [{
|
|
1465
1476
|
type: Component,
|
|
1466
1477
|
args: [{ selector: 'onshore-form-sort-item', imports: [CommonModule, OnshoreFormItemContainer, TranslateModule, FormsModule, ReactiveFormsModule], 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", styles: ["onshore-form-sort-item .onshore-sort-item{font-family:Lato-Regular!important}.gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)\";filter:alpha(opacity=80);pointer-events:none;font-family:Lato-Regular!important}.gu-hide{left:-9999px!important}.gu-unselectable{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.gu-transit{opacity:.2;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)\";filter:alpha(opacity=20)}\n"] }]
|
|
1467
|
-
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
1478
|
+
}], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
|
|
1468
1479
|
type: Self
|
|
1469
1480
|
}, {
|
|
1470
1481
|
type: Optional
|
|
@@ -1524,13 +1535,13 @@ class OnshoreFormScannerItemComponent {
|
|
|
1524
1535
|
this.ngControl.valueAccessor = this;
|
|
1525
1536
|
}
|
|
1526
1537
|
OnshoreFormTemplateType = OnshoreFormTemplateType;
|
|
1527
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1528
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1538
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormScannerItemComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1539
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: OnshoreFormScannerItemComponent, isStandalone: true, selector: "onshore-form-scanner-item", inputs: { formTemplate: "formTemplate", actionButtonDisabled: "actionButtonDisabled", webcamDisabled: "webcamDisabled", scannerDisabled: "scannerDisabled", editDisabled: "editDisabled", editable: "editable", integerOnly: "integerOnly", autofocus: "autofocus", length: "length" }, outputs: { actionButtonClick: "actionButtonClick", webcamClick: "webcamClick", scannerClick: "scannerClick" }, viewQueries: [{ propertyName: "scanPopover", first: true, predicate: ["scanPopover"], descendants: true }], 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=\"flex gap-2\">\n <p-inputOtp [formControl]=\"formControl\"\n [disabled]=\"disabled || !editable\"\n [integerOnly]=\"integerOnly\"\n [length]=\"length\"\n [autofocus]=\"autofocus\">\n </p-inputOtp>\n\n <p-button *ngIf=\"!scannerDisabled\" (click)=\"scanPopover.toggle($event); webcamClick.emit()\" icon=\"fa fa-qrcode\" severity=\"secondary\" label=\"{{ 'form.scannerControl.labelScanner' | translate }}\" />\n <p-button *ngIf=\"!webcamDisabled\" (click)=\"scannerClick.emit()\" icon=\"fa fa-video\" severity=\"secondary\" label=\"{{ 'form.scannerControl.labelWebcam' | translate }}\" />\n <p-button *ngIf=\"!editDisabled\" icon=\"fa fa-pen\" severity=\"secondary\" (click)=\"editable = true\" label=\"{{ 'form.scannerControl.labelInput' | translate }}\" />\n </div>\n\n</onshore-form-item-container>\n\n<p-popover #scanPopover>\n <div class=\"flex flex-column justify-content-center align-items-center gap-2\">\n <i *ngIf=\"!ngControl.control?.value\" class=\"fa fa-qrcode fa-2x\"></i>\n <span *ngIf=\"!ngControl.control?.value\">{{'form.scannerControl.startScanLabel' | translate}}</span>\n <p-chip *ngIf=\"ngControl.control?.value\" [label]=\"ngControl.control?.value\" icon=\"fa fa fa-qrcode\" />\n </div>\n</p-popover>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: OnshoreFormItemContainer, selector: "onshore-form-item-container", inputs: ["formTemplate", "ngControl", "actionButtonDisabled"], outputs: ["actionButtonClick", "lockIsChanged"] }, { kind: "ngmodule", type: ChipModule }, { kind: "component", type: i5.Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "styleClass", "disabled", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i4$3.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: InputOtpModule }, { kind: "component", type: i5$2.InputOtp, selector: "p-inputOtp, p-inputotp, p-input-otp", inputs: ["readonly", "tabindex", "length", "styleClass", "mask", "integerOnly", "autofocus", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2$2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1529
1540
|
}
|
|
1530
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormScannerItemComponent, decorators: [{
|
|
1531
1542
|
type: Component,
|
|
1532
1543
|
args: [{ selector: 'onshore-form-scanner-item', imports: [CommonModule, TranslateModule, OnshoreFormItemContainer, ChipModule, PopoverModule, FormsModule, ReactiveFormsModule, InputOtpModule, ButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\"\n [ngControl]=\"ngControl\"\n (actionButtonClick)=\"actionButtonClick.emit()\"\n [actionButtonDisabled]=\"actionButtonDisabled\">\n\n <div class=\"flex gap-2\">\n <p-inputOtp [formControl]=\"formControl\"\n [disabled]=\"disabled || !editable\"\n [integerOnly]=\"integerOnly\"\n [length]=\"length\"\n [autofocus]=\"autofocus\">\n </p-inputOtp>\n\n <p-button *ngIf=\"!scannerDisabled\" (click)=\"scanPopover.toggle($event); webcamClick.emit()\" icon=\"fa fa-qrcode\" severity=\"secondary\" label=\"{{ 'form.scannerControl.labelScanner' | translate }}\" />\n <p-button *ngIf=\"!webcamDisabled\" (click)=\"scannerClick.emit()\" icon=\"fa fa-video\" severity=\"secondary\" label=\"{{ 'form.scannerControl.labelWebcam' | translate }}\" />\n <p-button *ngIf=\"!editDisabled\" icon=\"fa fa-pen\" severity=\"secondary\" (click)=\"editable = true\" label=\"{{ 'form.scannerControl.labelInput' | translate }}\" />\n </div>\n\n</onshore-form-item-container>\n\n<p-popover #scanPopover>\n <div class=\"flex flex-column justify-content-center align-items-center gap-2\">\n <i *ngIf=\"!ngControl.control?.value\" class=\"fa fa-qrcode fa-2x\"></i>\n <span *ngIf=\"!ngControl.control?.value\">{{'form.scannerControl.startScanLabel' | translate}}</span>\n <p-chip *ngIf=\"ngControl.control?.value\" [label]=\"ngControl.control?.value\" icon=\"fa fa fa-qrcode\" />\n </div>\n</p-popover>\n" }]
|
|
1533
|
-
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
1544
|
+
}], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
|
|
1534
1545
|
type: Self
|
|
1535
1546
|
}, {
|
|
1536
1547
|
type: Optional
|