onshore-forms 1.1.9 → 1.1.11

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.
@@ -31,8 +31,10 @@ import { ColorPickerModule } from 'primeng/colorpicker';
31
31
  import { updatePreset } from '@primeuix/themes';
32
32
  import * as i3$3 from 'primeng/select';
33
33
  import { SelectModule } from 'primeng/select';
34
- import * as i5 from 'primeng/dialog';
34
+ import * as i5$1 from 'primeng/dialog';
35
35
  import { DialogModule } from 'primeng/dialog';
36
+ import * as i5 from 'primeng/tag';
37
+ import { TagModule } from 'primeng/tag';
36
38
  import { ImageCropperComponent } from 'ngx-image-cropper';
37
39
  import * as i4$2 from 'ngx-webcam';
38
40
  import { WebcamModule } from 'ngx-webcam';
@@ -49,7 +51,7 @@ import { KeyFilterModule } from 'primeng/keyfilter';
49
51
  import * as i2$5 from 'primeng/toggleswitch';
50
52
  import { ToggleSwitchModule } from 'primeng/toggleswitch';
51
53
  import { DatePicker } from 'primeng/datepicker';
52
- import * as i5$1 from 'primeng/inputotp';
54
+ import * as i5$2 from 'primeng/inputotp';
53
55
  import { InputOtpModule } from 'primeng/inputotp';
54
56
  import * as i4$4 from 'primeng/popover';
55
57
  import { PopoverModule } from 'primeng/popover';
@@ -490,9 +492,9 @@ class OnshoreFormAutocompleteItemComponent {
490
492
  showClear = false;
491
493
  searchedData = [];
492
494
  actionButtonDisabled = false;
493
- optionLabel = '';
494
- optionValue = '';
495
- dataKey = '_id';
495
+ optionLabel = 'label';
496
+ optionValue = 'value';
497
+ dataKey = 'value';
496
498
  secondOptionLabel = '';
497
499
  thirdOptionLabel = '';
498
500
  optionLabelDivider = '-';
@@ -511,7 +513,6 @@ class OnshoreFormAutocompleteItemComponent {
511
513
  }
512
514
  }
513
515
  unselect(event) {
514
- console.log("unselect", event);
515
516
  // @ts-ignore
516
517
  const updatedItems = this.ngControl.value.filter((item) => event.value[this.dataKey] !== item[this.dataKey]) || [];
517
518
  this.ngControl.control?.setValue(updatedItems);
@@ -831,13 +832,18 @@ class OnshoreFormDropdownItemComponent {
831
832
  cdr;
832
833
  formTemplate;
833
834
  multiple = false;
835
+ multipleItemSeverity = 'info';
834
836
  showClear = false;
837
+ showMultiClear = true;
835
838
  group = false;
836
839
  selectionLimit = 0;
837
840
  minLength = 0;
838
841
  optionLabel = 'label';
839
- optionValue = 'value';
840
- dataKey = 'value';
842
+ optionValue = '';
843
+ dataKey = '';
844
+ secondOptionLabel = '';
845
+ thirdOptionLabel = '';
846
+ optionLabelDivider = '-';
841
847
  optionGroupLabel = '';
842
848
  actionButtonDisabled = false;
843
849
  createEnabled = false;
@@ -870,11 +876,22 @@ class OnshoreFormDropdownItemComponent {
870
876
  get formControl() {
871
877
  return this.ngControl.control;
872
878
  }
879
+ findValue(item, key) {
880
+ let result = '';
881
+ const parts = key.split(' ');
882
+ parts.forEach(part => {
883
+ result += part.split('.').reduce((acc, subpart) => acc && acc[subpart], item) + ' ';
884
+ });
885
+ return result;
886
+ }
873
887
  ngOnInit() {
874
888
  if ((!this.ngControl.control?.value || this.ngControl.control?.value == '' || this.ngControl.control?.value == undefined) && !this.multiple) {
875
889
  this.ngControl.control?.setValue(this.formTemplate.default);
876
890
  this.cdr.markForCheck();
877
891
  }
892
+ else {
893
+ this.ngControl.control?.setValue(this.multiple ? [] : '');
894
+ }
878
895
  }
879
896
  ngOnDestroy() {
880
897
  this.ngControl.control?.disable();
@@ -891,6 +908,21 @@ class OnshoreFormDropdownItemComponent {
891
908
  this.cdr.markForCheck();
892
909
  }, 10);
893
910
  }
911
+ removeSelected(value, event) {
912
+ event.preventDefault();
913
+ event.stopPropagation();
914
+ let selected;
915
+ // @ts-ignore
916
+ if (this.optionValue)
917
+ selected = this.ngControl.control?.value.filter((x) => x !== value[this.optionValue]);
918
+ // @ts-ignore
919
+ if (this.dataKey)
920
+ selected = this.ngControl.control?.value.filter((x) => x[this.dataKey] !== value[this.dataKey]);
921
+ this.ngControl.control?.setValue(selected);
922
+ this.ngControl?.control?.updateValueAndValidity({ onlySelf: false, emitEvent: true });
923
+ this.ngControl?.control?.markAsDirty();
924
+ this.cdr.markForCheck();
925
+ }
894
926
  ngAfterViewInit() {
895
927
  this.checkExclude();
896
928
  }
@@ -912,11 +944,11 @@ class OnshoreFormDropdownItemComponent {
912
944
  }
913
945
  OnshoreFormTemplateType = OnshoreFormTemplateType;
914
946
  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 });
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 });
947
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: OnshoreFormDropdownItemComponent, isStandalone: true, selector: "onshore-form-dropdown-item", inputs: { formTemplate: "formTemplate", multiple: "multiple", multipleItemSeverity: "multipleItemSeverity", showClear: "showClear", showMultiClear: "showMultiClear", group: "group", selectionLimit: "selectionLimit", minLength: "minLength", optionLabel: "optionLabel", optionValue: "optionValue", dataKey: "dataKey", secondOptionLabel: "secondOptionLabel", thirdOptionLabel: "thirdOptionLabel", optionLabelDivider: "optionLabelDivider", 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 let-selectedItem #selectedItem>\n <div class=\"flex gap-1\">\n @if (optionLabel) {\n <span>{{ findValue(selectedItem, optionLabel) }}</span>\n } @else {\n <span>{{ selectedItem }}</span>\n }\n @if (secondOptionLabel) {\n @if (optionLabelDivider) {\n <span>{{optionLabelDivider}}</span>\n }\n <span>{{ findValue(selectedItem, secondOptionLabel) }}</span>\n }\n @if (thirdOptionLabel) {\n @if (optionLabelDivider) {\n <span>{{optionLabelDivider}}</span>\n }\n <span>{{ findValue(selectedItem, thirdOptionLabel) }}</span>\n }\n </div>\n </ng-template>\n\n <ng-template let-item #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\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 let-selectedItems #selecteditems>\n <div class=\"flex gap-2\">\n @for (selectedItem of selectedItems; track selectedItem) {\n <p-tag [severity]=\"multipleItemSeverity\">\n <div class=\"flex gap-1 align-items-center\">\n @if (optionLabel) {\n <span>{{ findValue(selectedItem, optionLabel) }}</span>\n } @else {\n <span>{{ selectedItem }}</span>\n }\n @if (secondOptionLabel) {\n @if (optionLabelDivider) {\n <span>{{optionLabelDivider}}</span>\n }\n <span>{{ findValue(selectedItem, secondOptionLabel) }}</span>\n }\n @if (thirdOptionLabel) {\n @if (optionLabelDivider) {\n <span>{{optionLabelDivider}}</span>\n }\n <span>{{ findValue(selectedItem, thirdOptionLabel) }}</span>\n }\n @if (showMultiClear) {\n <i class=\"fa fa-times cursor-pointer\" (click)=\"removeSelected(selectedItem, $event)\"></i>\n }\n </div>\n </p-tag>\n }\n </div>\n </ng-template>\n\n <ng-template let-item #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\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: "ngmodule", type: TagModule }, { kind: "component", type: i5.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
916
948
  }
917
949
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormDropdownItemComponent, decorators: [{
918
950
  type: Component,
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" }]
951
+ args: [{ selector: 'onshore-form-dropdown-item', imports: [CommonModule, ButtonModule, OnshoreFormItemContainer, TranslateModule, SelectModule, MultiSelectModule, FormsModule, ReactiveFormsModule, DialogModule, OnshoreInplaceInputComponent, TagModule], 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 let-selectedItem #selectedItem>\n <div class=\"flex gap-1\">\n @if (optionLabel) {\n <span>{{ findValue(selectedItem, optionLabel) }}</span>\n } @else {\n <span>{{ selectedItem }}</span>\n }\n @if (secondOptionLabel) {\n @if (optionLabelDivider) {\n <span>{{optionLabelDivider}}</span>\n }\n <span>{{ findValue(selectedItem, secondOptionLabel) }}</span>\n }\n @if (thirdOptionLabel) {\n @if (optionLabelDivider) {\n <span>{{optionLabelDivider}}</span>\n }\n <span>{{ findValue(selectedItem, thirdOptionLabel) }}</span>\n }\n </div>\n </ng-template>\n\n <ng-template let-item #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\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 let-selectedItems #selecteditems>\n <div class=\"flex gap-2\">\n @for (selectedItem of selectedItems; track selectedItem) {\n <p-tag [severity]=\"multipleItemSeverity\">\n <div class=\"flex gap-1 align-items-center\">\n @if (optionLabel) {\n <span>{{ findValue(selectedItem, optionLabel) }}</span>\n } @else {\n <span>{{ selectedItem }}</span>\n }\n @if (secondOptionLabel) {\n @if (optionLabelDivider) {\n <span>{{optionLabelDivider}}</span>\n }\n <span>{{ findValue(selectedItem, secondOptionLabel) }}</span>\n }\n @if (thirdOptionLabel) {\n @if (optionLabelDivider) {\n <span>{{optionLabelDivider}}</span>\n }\n <span>{{ findValue(selectedItem, thirdOptionLabel) }}</span>\n }\n @if (showMultiClear) {\n <i class=\"fa fa-times cursor-pointer\" (click)=\"removeSelected(selectedItem, $event)\"></i>\n }\n </div>\n </p-tag>\n }\n </div>\n </ng-template>\n\n <ng-template let-item #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\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" }]
920
952
  }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
921
953
  type: Self
922
954
  }, {
@@ -925,8 +957,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
925
957
  type: Input
926
958
  }], multiple: [{
927
959
  type: Input
960
+ }], multipleItemSeverity: [{
961
+ type: Input
928
962
  }], showClear: [{
929
963
  type: Input
964
+ }], showMultiClear: [{
965
+ type: Input
930
966
  }], group: [{
931
967
  type: Input
932
968
  }], selectionLimit: [{
@@ -939,6 +975,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
939
975
  type: Input
940
976
  }], dataKey: [{
941
977
  type: Input
978
+ }], secondOptionLabel: [{
979
+ type: Input
980
+ }], thirdOptionLabel: [{
981
+ type: Input
982
+ }], optionLabelDivider: [{
983
+ type: Input
942
984
  }], optionGroupLabel: [{
943
985
  type: Input
944
986
  }], actionButtonDisabled: [{
@@ -1284,7 +1326,7 @@ class OnshoreFormImageItemComponent {
1284
1326
  this.ngControl.valueAccessor = this;
1285
1327
  }
1286
1328
  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 });
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 });
1329
+ 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$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 });
1288
1330
  }
1289
1331
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormImageItemComponent, decorators: [{
1290
1332
  type: Component,
@@ -1756,7 +1798,7 @@ class OnshoreFormScannerItemComponent {
1756
1798
  }
1757
1799
  OnshoreFormTemplateType = OnshoreFormTemplateType;
1758
1800
  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 });
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 });
1801
+ 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$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$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 });
1760
1802
  }
1761
1803
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OnshoreFormScannerItemComponent, decorators: [{
1762
1804
  type: Component,