onshore-forms 1.1.8 → 1.1.9
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 +198 -36
- package/fesm2022/onshore-forms.mjs.map +1 -1
- package/package.json +1 -1
- package/types/onshore-forms.d.ts +46 -28
|
@@ -496,7 +496,7 @@ class OnshoreFormAutocompleteItemComponent {
|
|
|
496
496
|
secondOptionLabel = '';
|
|
497
497
|
thirdOptionLabel = '';
|
|
498
498
|
optionLabelDivider = '-';
|
|
499
|
-
|
|
499
|
+
exclude = false;
|
|
500
500
|
onSearch = new EventEmitter();
|
|
501
501
|
onSelect = new EventEmitter();
|
|
502
502
|
actionButtonClick = new EventEmitter();
|
|
@@ -560,7 +560,25 @@ class OnshoreFormAutocompleteItemComponent {
|
|
|
560
560
|
ngOnDestroy() {
|
|
561
561
|
this.ngControl.control?.disable();
|
|
562
562
|
}
|
|
563
|
+
checkExclude() {
|
|
564
|
+
setTimeout(() => {
|
|
565
|
+
if (this.exclude) {
|
|
566
|
+
this.ngControl.control?.disable();
|
|
567
|
+
}
|
|
568
|
+
else {
|
|
569
|
+
this.ngControl.control?.enable();
|
|
570
|
+
}
|
|
571
|
+
this.ngControl.control?.updateValueAndValidity({ onlySelf: false, emitEvent: true });
|
|
572
|
+
this.cdr.markForCheck();
|
|
573
|
+
}, 10);
|
|
574
|
+
}
|
|
575
|
+
ngAfterViewInit() {
|
|
576
|
+
this.checkExclude();
|
|
577
|
+
}
|
|
563
578
|
ngOnChanges(changes) {
|
|
579
|
+
if (changes['exclude']) {
|
|
580
|
+
this.checkExclude();
|
|
581
|
+
}
|
|
564
582
|
this.cdr.markForCheck();
|
|
565
583
|
}
|
|
566
584
|
constructor(cdr, ngControl) {
|
|
@@ -569,11 +587,11 @@ class OnshoreFormAutocompleteItemComponent {
|
|
|
569
587
|
this.ngControl.valueAccessor = this;
|
|
570
588
|
}
|
|
571
589
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormAutocompleteItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
572
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.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", secondOptionLabel: "secondOptionLabel", thirdOptionLabel: "thirdOptionLabel", optionLabelDivider: "optionLabelDivider",
|
|
590
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.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", secondOptionLabel: "secondOptionLabel", thirdOptionLabel: "thirdOptionLabel", optionLabelDivider: "optionLabelDivider", exclude: "exclude" }, 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 [hidden]=\"exclude\">\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 (onUnselect)=\"unselect($event)\"\n class=\"w-full\">\n <ng-template let-item pTemplate=\"item\">\n <div class=\"flex gap-1\">\n @if (optionLabel) {\n <span>{{ findValue(item, optionLabel) }}</span>\n } @else {\n <span>{{ item }}</span>\n }\n @if (secondOptionLabel) {\n @if (optionLabelDivider) {\n <span>{{optionLabelDivider}}</span>\n }\n <span>{{ findValue(item, secondOptionLabel) }}</span>\n }\n @if (thirdOptionLabel) {\n @if (optionLabelDivider) {\n <span>{{optionLabelDivider}}</span>\n }\n <span>{{ findValue(item, thirdOptionLabel) }}</span>\n }\n </div>\n </ng-template>\n </p-autoComplete>\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: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i2$2.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$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ChipModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FluidModule }, { kind: "component", type: i4.Fluid, selector: "p-fluid" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
573
591
|
}
|
|
574
592
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormAutocompleteItemComponent, decorators: [{
|
|
575
593
|
type: Component,
|
|
576
|
-
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 [hidden]=\"
|
|
594
|
+
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 [hidden]=\"exclude\">\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 (onUnselect)=\"unselect($event)\"\n class=\"w-full\">\n <ng-template let-item pTemplate=\"item\">\n <div class=\"flex gap-1\">\n @if (optionLabel) {\n <span>{{ findValue(item, optionLabel) }}</span>\n } @else {\n <span>{{ item }}</span>\n }\n @if (secondOptionLabel) {\n @if (optionLabelDivider) {\n <span>{{optionLabelDivider}}</span>\n }\n <span>{{ findValue(item, secondOptionLabel) }}</span>\n }\n @if (thirdOptionLabel) {\n @if (optionLabelDivider) {\n <span>{{optionLabelDivider}}</span>\n }\n <span>{{ findValue(item, thirdOptionLabel) }}</span>\n }\n </div>\n </ng-template>\n </p-autoComplete>\n </p-fluid>\n</onshore-form-item-container>\n" }]
|
|
577
595
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.NgControl, decorators: [{
|
|
578
596
|
type: Self
|
|
579
597
|
}, {
|
|
@@ -600,7 +618,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
600
618
|
type: Input
|
|
601
619
|
}], optionLabelDivider: [{
|
|
602
620
|
type: Input
|
|
603
|
-
}],
|
|
621
|
+
}], exclude: [{
|
|
604
622
|
type: Input
|
|
605
623
|
}], onSearch: [{
|
|
606
624
|
type: Output
|
|
@@ -615,7 +633,7 @@ class OnshoreFormCheckboxItemComponent {
|
|
|
615
633
|
cdr;
|
|
616
634
|
formTemplate;
|
|
617
635
|
actionButtonDisabled = false;
|
|
618
|
-
|
|
636
|
+
exclude = false;
|
|
619
637
|
actionButtonClick = new EventEmitter();
|
|
620
638
|
disabled = false;
|
|
621
639
|
// ControlValueAccessor interface
|
|
@@ -637,7 +655,25 @@ class OnshoreFormCheckboxItemComponent {
|
|
|
637
655
|
this.cdr.markForCheck();
|
|
638
656
|
}
|
|
639
657
|
}
|
|
658
|
+
checkExclude() {
|
|
659
|
+
setTimeout(() => {
|
|
660
|
+
if (this.exclude) {
|
|
661
|
+
this.ngControl.control?.disable();
|
|
662
|
+
}
|
|
663
|
+
else {
|
|
664
|
+
this.ngControl.control?.enable();
|
|
665
|
+
}
|
|
666
|
+
this.ngControl.control?.updateValueAndValidity({ onlySelf: false, emitEvent: true });
|
|
667
|
+
this.cdr.markForCheck();
|
|
668
|
+
}, 10);
|
|
669
|
+
}
|
|
670
|
+
ngAfterViewInit() {
|
|
671
|
+
this.checkExclude();
|
|
672
|
+
}
|
|
640
673
|
ngOnChanges(changes) {
|
|
674
|
+
if (changes['exclude']) {
|
|
675
|
+
this.checkExclude();
|
|
676
|
+
}
|
|
641
677
|
this.cdr.markForCheck();
|
|
642
678
|
}
|
|
643
679
|
ngOnDestroy() {
|
|
@@ -649,11 +685,11 @@ class OnshoreFormCheckboxItemComponent {
|
|
|
649
685
|
this.ngControl.valueAccessor = this;
|
|
650
686
|
}
|
|
651
687
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormCheckboxItemComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
652
|
-
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",
|
|
688
|
+
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", exclude: "exclude" }, 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 [hidden]=\"exclude\">\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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
653
689
|
}
|
|
654
690
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormCheckboxItemComponent, decorators: [{
|
|
655
691
|
type: Component,
|
|
656
|
-
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 [hidden]=\"
|
|
692
|
+
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 [hidden]=\"exclude\">\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" }]
|
|
657
693
|
}], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
|
|
658
694
|
type: Self
|
|
659
695
|
}, {
|
|
@@ -662,7 +698,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
662
698
|
type: Input
|
|
663
699
|
}], actionButtonDisabled: [{
|
|
664
700
|
type: Input
|
|
665
|
-
}],
|
|
701
|
+
}], exclude: [{
|
|
666
702
|
type: Input
|
|
667
703
|
}], actionButtonClick: [{
|
|
668
704
|
type: Output
|
|
@@ -673,7 +709,7 @@ class OnshoreFormColorpickerItemComponent {
|
|
|
673
709
|
cdr;
|
|
674
710
|
formTemplate;
|
|
675
711
|
actionButtonDisabled = false;
|
|
676
|
-
|
|
712
|
+
exclude = false;
|
|
677
713
|
actionButtonClick = new EventEmitter();
|
|
678
714
|
disabled = false;
|
|
679
715
|
colorPickerValue = '';
|
|
@@ -717,8 +753,26 @@ class OnshoreFormColorpickerItemComponent {
|
|
|
717
753
|
ngOnDestroy() {
|
|
718
754
|
this.ngControl.control?.disable();
|
|
719
755
|
}
|
|
756
|
+
checkExclude() {
|
|
757
|
+
setTimeout(() => {
|
|
758
|
+
if (this.exclude) {
|
|
759
|
+
this.ngControl.control?.disable();
|
|
760
|
+
}
|
|
761
|
+
else {
|
|
762
|
+
this.ngControl.control?.enable();
|
|
763
|
+
}
|
|
764
|
+
this.ngControl.control?.updateValueAndValidity({ onlySelf: false, emitEvent: true });
|
|
765
|
+
this.cdr.markForCheck();
|
|
766
|
+
}, 10);
|
|
767
|
+
}
|
|
768
|
+
ngAfterViewInit() {
|
|
769
|
+
this.checkExclude();
|
|
770
|
+
}
|
|
720
771
|
ngOnChanges(changes) {
|
|
721
772
|
this.colorPickerValue = this.ngControl.control?.value;
|
|
773
|
+
if (changes['exclude']) {
|
|
774
|
+
this.checkExclude();
|
|
775
|
+
}
|
|
722
776
|
this.cdr.markForCheck();
|
|
723
777
|
}
|
|
724
778
|
constructor(ngControl, cdr) {
|
|
@@ -728,11 +782,11 @@ class OnshoreFormColorpickerItemComponent {
|
|
|
728
782
|
this.changeLayoutPreset();
|
|
729
783
|
}
|
|
730
784
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormColorpickerItemComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
731
|
-
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",
|
|
785
|
+
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", exclude: "exclude" }, 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 [hidden]=\"exclude\">\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$2.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$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
732
786
|
}
|
|
733
787
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormColorpickerItemComponent, decorators: [{
|
|
734
788
|
type: Component,
|
|
735
|
-
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 [hidden]=\"
|
|
789
|
+
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 [hidden]=\"exclude\">\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" }]
|
|
736
790
|
}], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
|
|
737
791
|
type: Self
|
|
738
792
|
}, {
|
|
@@ -741,7 +795,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
741
795
|
type: Input
|
|
742
796
|
}], actionButtonDisabled: [{
|
|
743
797
|
type: Input
|
|
744
|
-
}],
|
|
798
|
+
}], exclude: [{
|
|
745
799
|
type: Input
|
|
746
800
|
}], actionButtonClick: [{
|
|
747
801
|
type: Output
|
|
@@ -788,7 +842,7 @@ class OnshoreFormDropdownItemComponent {
|
|
|
788
842
|
actionButtonDisabled = false;
|
|
789
843
|
createEnabled = false;
|
|
790
844
|
options = [];
|
|
791
|
-
|
|
845
|
+
exclude = false;
|
|
792
846
|
valueChange = new EventEmitter();
|
|
793
847
|
actionButtonClick = new EventEmitter();
|
|
794
848
|
entryCreated = new EventEmitter();
|
|
@@ -825,12 +879,30 @@ class OnshoreFormDropdownItemComponent {
|
|
|
825
879
|
ngOnDestroy() {
|
|
826
880
|
this.ngControl.control?.disable();
|
|
827
881
|
}
|
|
882
|
+
checkExclude() {
|
|
883
|
+
setTimeout(() => {
|
|
884
|
+
if (this.exclude) {
|
|
885
|
+
this.ngControl.control?.disable();
|
|
886
|
+
}
|
|
887
|
+
else {
|
|
888
|
+
this.ngControl.control?.enable();
|
|
889
|
+
}
|
|
890
|
+
this.ngControl.control?.updateValueAndValidity({ onlySelf: false, emitEvent: true });
|
|
891
|
+
this.cdr.markForCheck();
|
|
892
|
+
}, 10);
|
|
893
|
+
}
|
|
894
|
+
ngAfterViewInit() {
|
|
895
|
+
this.checkExclude();
|
|
896
|
+
}
|
|
828
897
|
ngOnChanges(changes) {
|
|
829
898
|
const currentOptions = changes['options']?.currentValue ?? changes['formTemplate']?.currentValue?.options;
|
|
830
899
|
//const previousOptions = changes['options']?.previousValue ?? changes['formTemplate']?.previousValue?.options;
|
|
831
900
|
if (!this.options && currentOptions) {
|
|
832
901
|
this.options = currentOptions;
|
|
833
902
|
}
|
|
903
|
+
if (changes['exclude']) {
|
|
904
|
+
this.checkExclude();
|
|
905
|
+
}
|
|
834
906
|
this.cdr.markForCheck();
|
|
835
907
|
}
|
|
836
908
|
constructor(ngControl, cdr) {
|
|
@@ -840,11 +912,11 @@ class OnshoreFormDropdownItemComponent {
|
|
|
840
912
|
}
|
|
841
913
|
OnshoreFormTemplateType = OnshoreFormTemplateType;
|
|
842
914
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormDropdownItemComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
843
|
-
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",
|
|
915
|
+
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", exclude: "exclude" }, 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 [hidden]=\"exclude\">\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: i1$1.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$3.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$1.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.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 });
|
|
844
916
|
}
|
|
845
917
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormDropdownItemComponent, decorators: [{
|
|
846
918
|
type: Component,
|
|
847
|
-
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 [hidden]=\"
|
|
919
|
+
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 [hidden]=\"exclude\">\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" }]
|
|
848
920
|
}], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
|
|
849
921
|
type: Self
|
|
850
922
|
}, {
|
|
@@ -875,7 +947,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
875
947
|
type: Input
|
|
876
948
|
}], options: [{
|
|
877
949
|
type: Input
|
|
878
|
-
}],
|
|
950
|
+
}], exclude: [{
|
|
879
951
|
type: Input
|
|
880
952
|
}], valueChange: [{
|
|
881
953
|
type: Output
|
|
@@ -1068,7 +1140,7 @@ class OnshoreFormImageItemComponent {
|
|
|
1068
1140
|
formTemplate;
|
|
1069
1141
|
imageSettings = undefined;
|
|
1070
1142
|
actionButtonDisabled = false;
|
|
1071
|
-
|
|
1143
|
+
exclude = false;
|
|
1072
1144
|
imageDeleted = new EventEmitter();
|
|
1073
1145
|
imageCleared = new EventEmitter();
|
|
1074
1146
|
imageReady = new EventEmitter();
|
|
@@ -1178,6 +1250,21 @@ class OnshoreFormImageItemComponent {
|
|
|
1178
1250
|
this.ngControl?.control?.disable();
|
|
1179
1251
|
this.image = undefined;
|
|
1180
1252
|
}
|
|
1253
|
+
checkExclude() {
|
|
1254
|
+
setTimeout(() => {
|
|
1255
|
+
if (this.exclude) {
|
|
1256
|
+
this.ngControl.control?.disable();
|
|
1257
|
+
}
|
|
1258
|
+
else {
|
|
1259
|
+
this.ngControl.control?.enable();
|
|
1260
|
+
}
|
|
1261
|
+
this.ngControl.control?.updateValueAndValidity({ onlySelf: false, emitEvent: true });
|
|
1262
|
+
this.cdr.markForCheck();
|
|
1263
|
+
}, 10);
|
|
1264
|
+
}
|
|
1265
|
+
ngAfterViewInit() {
|
|
1266
|
+
this.checkExclude();
|
|
1267
|
+
}
|
|
1181
1268
|
ngOnChanges(changes) {
|
|
1182
1269
|
const imageSettings = changes['imageSettings']?.currentValue;
|
|
1183
1270
|
this.imageSettings = {
|
|
@@ -1185,6 +1272,9 @@ class OnshoreFormImageItemComponent {
|
|
|
1185
1272
|
...imageSettings,
|
|
1186
1273
|
placeholderIcon: imageSettings?.placeholderImage ? '' : (imageSettings?.placeholderIcon ?? this.defaultImageSettings.placeholderIcon)
|
|
1187
1274
|
};
|
|
1275
|
+
if (changes['exclude']) {
|
|
1276
|
+
this.checkExclude();
|
|
1277
|
+
}
|
|
1188
1278
|
//this.removeImage();
|
|
1189
1279
|
this.cdr.markForCheck();
|
|
1190
1280
|
}
|
|
@@ -1194,11 +1284,11 @@ class OnshoreFormImageItemComponent {
|
|
|
1194
1284
|
this.ngControl.valueAccessor = this;
|
|
1195
1285
|
}
|
|
1196
1286
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormImageItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1197
|
-
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",
|
|
1287
|
+
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", exclude: "exclude" }, outputs: { imageDeleted: "imageDeleted", imageCleared: "imageCleared", imageReady: "imageReady", selectFromMedia: "selectFromMedia", isLoading: "isLoading" }, usesOnChanges: true, ngImport: i0, template: "<onshore-form-item-container [formTemplate]=\"formTemplate\" [ngControl]=\"ngControl\" [hidden]=\"exclude\">\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: i1$1.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: i4.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$1.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.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 });
|
|
1198
1288
|
}
|
|
1199
1289
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormImageItemComponent, decorators: [{
|
|
1200
1290
|
type: Component,
|
|
1201
|
-
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\" [hidden]=\"
|
|
1291
|
+
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\" [hidden]=\"exclude\">\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" }]
|
|
1202
1292
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.NgControl, decorators: [{
|
|
1203
1293
|
type: Self
|
|
1204
1294
|
}, {
|
|
@@ -1209,7 +1299,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
1209
1299
|
type: Input
|
|
1210
1300
|
}], actionButtonDisabled: [{
|
|
1211
1301
|
type: Input
|
|
1212
|
-
}],
|
|
1302
|
+
}], exclude: [{
|
|
1213
1303
|
type: Input
|
|
1214
1304
|
}], imageDeleted: [{
|
|
1215
1305
|
type: Output
|
|
@@ -1336,7 +1426,7 @@ class OnshoreFormSwitchItemComponent {
|
|
|
1336
1426
|
cdr;
|
|
1337
1427
|
formTemplate;
|
|
1338
1428
|
actionButtonDisabled = false;
|
|
1339
|
-
|
|
1429
|
+
exclude = false;
|
|
1340
1430
|
valueChange = new EventEmitter();
|
|
1341
1431
|
actionButtonClick = new EventEmitter();
|
|
1342
1432
|
disabled = false;
|
|
@@ -1359,7 +1449,25 @@ class OnshoreFormSwitchItemComponent {
|
|
|
1359
1449
|
this.cdr.markForCheck();
|
|
1360
1450
|
}
|
|
1361
1451
|
}
|
|
1452
|
+
checkExclude() {
|
|
1453
|
+
setTimeout(() => {
|
|
1454
|
+
if (this.exclude) {
|
|
1455
|
+
this.ngControl.control?.disable();
|
|
1456
|
+
}
|
|
1457
|
+
else {
|
|
1458
|
+
this.ngControl.control?.enable();
|
|
1459
|
+
}
|
|
1460
|
+
this.ngControl.control?.updateValueAndValidity({ onlySelf: false, emitEvent: true });
|
|
1461
|
+
this.cdr.markForCheck();
|
|
1462
|
+
}, 10);
|
|
1463
|
+
}
|
|
1464
|
+
ngAfterViewInit() {
|
|
1465
|
+
this.checkExclude();
|
|
1466
|
+
}
|
|
1362
1467
|
ngOnChanges(changes) {
|
|
1468
|
+
if (changes['exclude']) {
|
|
1469
|
+
this.checkExclude();
|
|
1470
|
+
}
|
|
1363
1471
|
this.cdr.markForCheck();
|
|
1364
1472
|
}
|
|
1365
1473
|
ngOnDestroy() {
|
|
@@ -1371,11 +1479,11 @@ class OnshoreFormSwitchItemComponent {
|
|
|
1371
1479
|
this.ngControl.valueAccessor = this;
|
|
1372
1480
|
}
|
|
1373
1481
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormSwitchItemComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1374
|
-
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",
|
|
1482
|
+
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", exclude: "exclude" }, 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 [hidden]=\"exclude\">\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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1375
1483
|
}
|
|
1376
1484
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormSwitchItemComponent, decorators: [{
|
|
1377
1485
|
type: Component,
|
|
1378
|
-
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 [hidden]=\"
|
|
1486
|
+
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 [hidden]=\"exclude\">\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" }]
|
|
1379
1487
|
}], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
|
|
1380
1488
|
type: Self
|
|
1381
1489
|
}, {
|
|
@@ -1384,7 +1492,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
1384
1492
|
type: Input
|
|
1385
1493
|
}], actionButtonDisabled: [{
|
|
1386
1494
|
type: Input
|
|
1387
|
-
}],
|
|
1495
|
+
}], exclude: [{
|
|
1388
1496
|
type: Input
|
|
1389
1497
|
}], valueChange: [{
|
|
1390
1498
|
type: Output
|
|
@@ -1397,7 +1505,7 @@ class OnshoreFormDatetimeItemComponent {
|
|
|
1397
1505
|
cdr;
|
|
1398
1506
|
formTemplate;
|
|
1399
1507
|
actionButtonDisabled = false;
|
|
1400
|
-
|
|
1508
|
+
exclude = false;
|
|
1401
1509
|
actionButtonClick = new EventEmitter();
|
|
1402
1510
|
dateFormat = 'dd.mm.yy';
|
|
1403
1511
|
hourFormat = '24';
|
|
@@ -1420,7 +1528,25 @@ class OnshoreFormDatetimeItemComponent {
|
|
|
1420
1528
|
this.cdr.markForCheck();
|
|
1421
1529
|
}
|
|
1422
1530
|
}
|
|
1531
|
+
checkExclude() {
|
|
1532
|
+
setTimeout(() => {
|
|
1533
|
+
if (this.exclude) {
|
|
1534
|
+
this.ngControl.control?.disable();
|
|
1535
|
+
}
|
|
1536
|
+
else {
|
|
1537
|
+
this.ngControl.control?.enable();
|
|
1538
|
+
}
|
|
1539
|
+
this.ngControl.control?.updateValueAndValidity({ onlySelf: false, emitEvent: true });
|
|
1540
|
+
this.cdr.markForCheck();
|
|
1541
|
+
}, 10);
|
|
1542
|
+
}
|
|
1543
|
+
ngAfterViewInit() {
|
|
1544
|
+
this.checkExclude();
|
|
1545
|
+
}
|
|
1423
1546
|
ngOnChanges(changes) {
|
|
1547
|
+
if (changes['exclude']) {
|
|
1548
|
+
this.checkExclude();
|
|
1549
|
+
}
|
|
1424
1550
|
this.cdr.markForCheck();
|
|
1425
1551
|
}
|
|
1426
1552
|
ngOnDestroy() {
|
|
@@ -1432,11 +1558,11 @@ class OnshoreFormDatetimeItemComponent {
|
|
|
1432
1558
|
this.ngControl.valueAccessor = this;
|
|
1433
1559
|
}
|
|
1434
1560
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormDatetimeItemComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1435
|
-
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",
|
|
1561
|
+
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", exclude: "exclude", 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 [hidden]=\"exclude\">\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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FluidModule }, { kind: "component", type: i4.Fluid, selector: "p-fluid" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1436
1562
|
}
|
|
1437
1563
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormDatetimeItemComponent, decorators: [{
|
|
1438
1564
|
type: Component,
|
|
1439
|
-
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 [hidden]=\"
|
|
1565
|
+
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 [hidden]=\"exclude\">\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" }]
|
|
1440
1566
|
}], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
|
|
1441
1567
|
type: Self
|
|
1442
1568
|
}, {
|
|
@@ -1445,7 +1571,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
1445
1571
|
type: Input
|
|
1446
1572
|
}], actionButtonDisabled: [{
|
|
1447
1573
|
type: Input
|
|
1448
|
-
}],
|
|
1574
|
+
}], exclude: [{
|
|
1449
1575
|
type: Input
|
|
1450
1576
|
}], actionButtonClick: [{
|
|
1451
1577
|
type: Output
|
|
@@ -1462,7 +1588,7 @@ class OnshoreFormSortItemComponent {
|
|
|
1462
1588
|
cdr;
|
|
1463
1589
|
formTemplate;
|
|
1464
1590
|
actionButtonDisabled = false;
|
|
1465
|
-
|
|
1591
|
+
exclude = false;
|
|
1466
1592
|
actionButtonClick = new EventEmitter();
|
|
1467
1593
|
sortItems = [];
|
|
1468
1594
|
tempLockValue = [];
|
|
@@ -1513,7 +1639,25 @@ class OnshoreFormSortItemComponent {
|
|
|
1513
1639
|
}
|
|
1514
1640
|
this.cdr.markForCheck();
|
|
1515
1641
|
}
|
|
1642
|
+
checkExclude() {
|
|
1643
|
+
setTimeout(() => {
|
|
1644
|
+
if (this.exclude) {
|
|
1645
|
+
this.ngControl.control?.disable();
|
|
1646
|
+
}
|
|
1647
|
+
else {
|
|
1648
|
+
this.ngControl.control?.enable();
|
|
1649
|
+
}
|
|
1650
|
+
this.ngControl.control?.updateValueAndValidity({ onlySelf: false, emitEvent: true });
|
|
1651
|
+
this.cdr.markForCheck();
|
|
1652
|
+
}, 10);
|
|
1653
|
+
}
|
|
1654
|
+
ngAfterViewInit() {
|
|
1655
|
+
this.checkExclude();
|
|
1656
|
+
}
|
|
1516
1657
|
ngOnChanges(changes) {
|
|
1658
|
+
if (changes['exclude']) {
|
|
1659
|
+
this.checkExclude();
|
|
1660
|
+
}
|
|
1517
1661
|
this.cdr.markForCheck();
|
|
1518
1662
|
}
|
|
1519
1663
|
ngOnDestroy() {
|
|
@@ -1525,11 +1669,11 @@ class OnshoreFormSortItemComponent {
|
|
|
1525
1669
|
this.ngControl.valueAccessor = this;
|
|
1526
1670
|
}
|
|
1527
1671
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormSortItemComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1528
|
-
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",
|
|
1672
|
+
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", exclude: "exclude" }, 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 [hidden]=\"exclude\">\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 });
|
|
1529
1673
|
}
|
|
1530
1674
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormSortItemComponent, decorators: [{
|
|
1531
1675
|
type: Component,
|
|
1532
|
-
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 [hidden]=\"
|
|
1676
|
+
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 [hidden]=\"exclude\">\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"] }]
|
|
1533
1677
|
}], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
|
|
1534
1678
|
type: Self
|
|
1535
1679
|
}, {
|
|
@@ -1538,7 +1682,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
1538
1682
|
type: Input
|
|
1539
1683
|
}], actionButtonDisabled: [{
|
|
1540
1684
|
type: Input
|
|
1541
|
-
}],
|
|
1685
|
+
}], exclude: [{
|
|
1542
1686
|
type: Input
|
|
1543
1687
|
}], actionButtonClick: [{
|
|
1544
1688
|
type: Output
|
|
@@ -1557,7 +1701,7 @@ class OnshoreFormScannerItemComponent {
|
|
|
1557
1701
|
integerOnly = true;
|
|
1558
1702
|
autofocus = false;
|
|
1559
1703
|
length = 4;
|
|
1560
|
-
|
|
1704
|
+
exclude = false;
|
|
1561
1705
|
actionButtonClick = new EventEmitter();
|
|
1562
1706
|
webcamClick = new EventEmitter();
|
|
1563
1707
|
scannerClick = new EventEmitter();
|
|
@@ -1584,7 +1728,25 @@ class OnshoreFormScannerItemComponent {
|
|
|
1584
1728
|
ngOnDestroy() {
|
|
1585
1729
|
this.ngControl.control?.disable();
|
|
1586
1730
|
}
|
|
1731
|
+
checkExclude() {
|
|
1732
|
+
setTimeout(() => {
|
|
1733
|
+
if (this.exclude) {
|
|
1734
|
+
this.ngControl.control?.disable();
|
|
1735
|
+
}
|
|
1736
|
+
else {
|
|
1737
|
+
this.ngControl.control?.enable();
|
|
1738
|
+
}
|
|
1739
|
+
this.ngControl.control?.updateValueAndValidity({ onlySelf: false, emitEvent: true });
|
|
1740
|
+
this.cdr.markForCheck();
|
|
1741
|
+
}, 10);
|
|
1742
|
+
}
|
|
1743
|
+
ngAfterViewInit() {
|
|
1744
|
+
this.checkExclude();
|
|
1745
|
+
}
|
|
1587
1746
|
ngOnChanges(changes) {
|
|
1747
|
+
if (changes['exclude']) {
|
|
1748
|
+
this.checkExclude();
|
|
1749
|
+
}
|
|
1588
1750
|
this.cdr.markForCheck();
|
|
1589
1751
|
}
|
|
1590
1752
|
constructor(ngControl, cdr) {
|
|
@@ -1594,11 +1756,11 @@ class OnshoreFormScannerItemComponent {
|
|
|
1594
1756
|
}
|
|
1595
1757
|
OnshoreFormTemplateType = OnshoreFormTemplateType;
|
|
1596
1758
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormScannerItemComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1597
|
-
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",
|
|
1759
|
+
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", exclude: "exclude" }, 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 [hidden]=\"exclude\">\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: i1$1.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: i3$5.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$4.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: InputOtpModule }, { kind: "component", type: i5$1.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$1.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 });
|
|
1598
1760
|
}
|
|
1599
1761
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormScannerItemComponent, decorators: [{
|
|
1600
1762
|
type: Component,
|
|
1601
|
-
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 [hidden]=\"
|
|
1763
|
+
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 [hidden]=\"exclude\">\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" }]
|
|
1602
1764
|
}], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
|
|
1603
1765
|
type: Self
|
|
1604
1766
|
}, {
|
|
@@ -1624,7 +1786,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
1624
1786
|
type: Input
|
|
1625
1787
|
}], length: [{
|
|
1626
1788
|
type: Input
|
|
1627
|
-
}],
|
|
1789
|
+
}], exclude: [{
|
|
1628
1790
|
type: Input
|
|
1629
1791
|
}], actionButtonClick: [{
|
|
1630
1792
|
type: Output
|